/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package Formularios2;

import Atributos.*;
import BD.CriaConexao;
import Formularios.Layout;
import Metodos.*;
import java.awt.Color;
import java.awt.image.BufferedImage;
import java.io.File;
import java.io.IOException;
import java.sql.Connection;
import java.sql.SQLException;
import java.util.HashMap;
import java.util.List;
import java.util.logging.Level;
import java.util.logging.Logger;
import javax.imageio.ImageIO;
import javax.swing.JOptionPane;
import javax.swing.JTable;
import javax.swing.ListSelectionModel;
import javax.swing.event.ListSelectionEvent;
import javax.swing.event.ListSelectionListener;
import javax.swing.table.DefaultTableModel;
import net.sf.jasperreports.engine.JRException;
import net.sf.jasperreports.engine.JasperExportManager;
import net.sf.jasperreports.engine.JasperFillManager;
import net.sf.jasperreports.engine.JasperPrint;

/**
 *
 * @author Andre
 */
public class Menu3 extends javax.swing.JFrame {

private List<Curso> lista;
 MinimizaTela tela= new MinimizaTela();  
 Curso curso=new Curso();
 CursoMet cursomet=new CursoMet();
 String escolha; 
 DefaultTableModel tmDisc = new DefaultTableModel(null, new String[]{"Nome"});
    List<Disciplina> Disc;
    ListSelectionModel lsmDisc;
    DefaultTableModel tmDisc2 = new DefaultTableModel(null, new String[]{"Eixo", "Curso", "Matéria"});
   
    List<Disciplina> Disc2;
    
    ListSelectionModel lsmDisc2;
    static private int id_disciplina;
private List<Curso> listaC;
Serie serie= new Serie();
 Disciplina disciplina=new Disciplina();
 DisciplinaMet discmet=new DisciplinaMet();

 SerieMet seriemet=new SerieMet();
 DefaultTableModel tmSerie = new DefaultTableModel(null, new String[]{"Ano", "Curso", "Turma"});
 
 ListSelectionModel lsmSerie;
 private List<Serie> listaS;
 DefaultTableModel tmHA = new DefaultTableModel(null, new String[]{"Serie", "Turma", "Professor", "Disciplina", "Horas Aula"});
    List<HorasAula> HA;
    ListSelectionModel lsmHA;
    
    HorasAulaMet hamet=new HorasAulaMet();
    List <Disciplina> listaD, listaDR;
   
 ProfDiscMet profdiscmet=new ProfDiscMet();
 
ProfessorMet profmet=new ProfessorMet();
 Professor professor=new Professor();
 List <Professor> listaP;

   DefaultTableModel tmHA2 = new DefaultTableModel(null, new String[]{"Professor", "Disciplina", "Horas Aula"});
 
 ListSelectionModel lsmHA2;
    static String pesquisa;
    static File arquivo;
  ObjetoMet objmet= new ObjetoMet();
    private String turnoA,turnoB,turnoC,turnoD,turnoE,turnoF,turnoG,turnoH;
    static String SerieA1="",SerieA2="",SerieA3="",SerieB1="",SerieB2="",SerieB3="",SerieC1="",SerieC2="",SerieC3="",SerieD1,SerieD2,SerieD3,SerieE1,SerieE2,SerieE3,SerieF1,SerieF2,SerieF3= "";
      static int Serieturma;
      private List<Serie> listaserie;
      private String [] nome_turma;
  String nome_curso;
 
Professor prof=new Professor();
ProfessorDiasMet profdiasmet=new ProfessorDiasMet();
ProfessorDias profdias=new ProfessorDias();
DefaultTableModel tmProf_prof = new DefaultTableModel(null, new String[]{"Professor"});
    List<Professor> Prof; 
    ListSelectionModel lsmProf_prof;
    
       
    static String d1,d2,d3,d4,d5,d6,d7,d8,d9,d10,d11,d12,d13,d14,d15,d16,d17,d18,d19,d20,d21,d22,d23,d24,d25,d26;
      static String disc11,disc22,disc33,disc44,disc55;
      static String asd = "";
      static String asd2= "";
      static String asd3= "";
      static String asd4= "";
      static int a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z,asdd;
    static int linha,coluna;
static int qwe;
    static int id_deste;
 
  
 ProfessorDisciplina profdisc= new ProfessorDisciplina();
 ProfessorSerieTurmaMet profserieturmamet= new ProfessorSerieTurmaMet();
 
 List<ProfessorDias> listaPD;
 static int id=0;
 DefaultTableModel tmDisc_prof = new DefaultTableModel(null, new String[]{"Matéria"});
    ListSelectionModel lsmDisc_prof;
 DefaultTableModel tmDisc_prof_reg = new DefaultTableModel(null, new String[]{"Matéria"});
    ListSelectionModel lsmDisc_prof_reg;
       
    /**
     * Creates new form NewJFrame
     */
    public Menu3() {
        try {
            for (javax.swing.UIManager.LookAndFeelInfo info : javax.swing.UIManager.getInstalledLookAndFeels()) {
                if ("Windows".equals(info.getName())) {
                    javax.swing.UIManager.setLookAndFeel(info.getClassName());
                    break;
                }
            }
        } catch (ClassNotFoundException | InstantiationException | IllegalAccessException | javax.swing.UnsupportedLookAndFeelException ex) {
            java.util.logging.Logger.getLogger(Menu3.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        }
        initComponents();
        BufferedImage image=null;
        File imageFile=new File(".\\src\\Imagens\\sghverde3.png");
        try {
            image=ImageIO.read(imageFile);
            
        } catch (IOException ex) {
        }
        this.setIconImage(image);
        jDialog1.setIconImage(image);
        jDialog2.setIconImage(image);
        jDialog3.setIconImage(image);
          jD_addestagio.setIconImage(image);
          jD_aula10.setIconImage(image);
          jD_esc_rel.setIconImage(image);
          jD_grade_curricular.setIconImage(image);
          jD_salva.setIconImage(image);
          jD_sn.setIconImage(image);
          
        jDialog1.setVisible(false);
        jDialog2.setVisible(false);
        jDialog3.setVisible(false);
        jDialog4.setVisible(false);
        jPanel_curso.setVisible(false);
        jPanel_disciplina.setVisible(false);
          jPanel_serie.setVisible(false);
          jPanel_hora_aula.setVisible(false);
          jPanel_prof.setVisible(false);
          jD_addestagio.setVisible(false);
          jD_aula10.setVisible(false);
          jD_esc_rel.setVisible(false);
          jD_grade_curricular.setVisible(false);
          jD_salva.setVisible(false);
          jD_sn.setVisible(false);
    }

    /**
     * This method is called from within the constructor to initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is always
     * regenerated by the Form Editor.
     */
    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        buttonGroup1 = new javax.swing.ButtonGroup();
        buttonGroup2 = new javax.swing.ButtonGroup();
        buttonGroup3 = new javax.swing.ButtonGroup();
        jD_aula10 = new javax.swing.JDialog();
        jPanel10 = new javax.swing.JPanel();
        jSeparator4 = new javax.swing.JSeparator();
        jCheckBox111 = new javax.swing.JCheckBox();
        jCheckBox333 = new javax.swing.JCheckBox();
        jCheckBox555 = new javax.swing.JCheckBox();
        jCheckBox777 = new javax.swing.JCheckBox();
        jCheckBox222 = new javax.swing.JCheckBox();
        jCheckBox444 = new javax.swing.JCheckBox();
        jCheckBox666 = new javax.swing.JCheckBox();
        jCheckBox888 = new javax.swing.JCheckBox();
        jCheckBox999 = new javax.swing.JCheckBox();
        jCheckBox100 = new javax.swing.JCheckBox();
        jCheckBox120 = new javax.swing.JCheckBox();
        jCheckBox110 = new javax.swing.JCheckBox();
        jCheckBox130 = new javax.swing.JCheckBox();
        jCheckBox140 = new javax.swing.JCheckBox();
        jCheckBox160 = new javax.swing.JCheckBox();
        jCheckBox150 = new javax.swing.JCheckBox();
        jCheckBox180 = new javax.swing.JCheckBox();
        jCheckBox170 = new javax.swing.JCheckBox();
        jLabel2 = new javax.swing.JLabel();
        jButton15 = new javax.swing.JButton();
        jButton16 = new javax.swing.JButton();
        jD_salva = new javax.swing.JDialog();
        jFileChooser1 = new javax.swing.JFileChooser();
        jD_esc_rel = new javax.swing.JDialog();
        jDesktopPane6 = new javax.swing.JDesktopPane();
        jPanel7 = new javax.swing.JPanel();
        jSeparator1 = new javax.swing.JSeparator();
        jl_serie = new javax.swing.JLabel();
        jButton_gc = new javax.swing.JButton();
        jButton_horario = new javax.swing.JButton();
        jD_grade_curricular = new javax.swing.JDialog();
        jDesktopPane4 = new javax.swing.JDesktopPane();
        jPanel5 = new javax.swing.JPanel();
        jSeparator2 = new javax.swing.JSeparator();
        jCheckBox1 = new javax.swing.JCheckBox();
        jCheckBox2 = new javax.swing.JCheckBox();
        jCheckBox3 = new javax.swing.JCheckBox();
        jCheckBox4 = new javax.swing.JCheckBox();
        jCheckBox5 = new javax.swing.JCheckBox();
        jCheckBox6 = new javax.swing.JCheckBox();
        jCheckBox7 = new javax.swing.JCheckBox();
        jCheckBox8 = new javax.swing.JCheckBox();
        jButton10 = new javax.swing.JButton();
        jButton11 = new javax.swing.JButton();
        jD_sn = new javax.swing.JDialog();
        jDesktopPane7 = new javax.swing.JDesktopPane();
        jPanel8 = new javax.swing.JPanel();
        jSeparator3 = new javax.swing.JSeparator();
        jl_serie1 = new javax.swing.JLabel();
        jButton8 = new javax.swing.JButton();
        jButton9 = new javax.swing.JButton();
        jButton12 = new javax.swing.JButton();
        jD_addestagio = new javax.swing.JDialog();
        jDesktopPane8 = new javax.swing.JDesktopPane();
        jPanel9 = new javax.swing.JPanel();
        jSeparator55 = new javax.swing.JSeparator();
        jl_serie2 = new javax.swing.JLabel();
        jl_serie3 = new javax.swing.JLabel();
        jl_serie4 = new javax.swing.JLabel();
        jSeparator5 = new javax.swing.JSeparator();
        serieEE = new javax.swing.JTextField();
        jSeparator6 = new javax.swing.JSeparator();
        serieextra = new javax.swing.JTextField();
        RB_manhaE = new javax.swing.JRadioButton();
        RB_tardeE = new javax.swing.JRadioButton();
        jSeparator7 = new javax.swing.JSeparator();
        serieFF = new javax.swing.JTextField();
        RB_manhaF = new javax.swing.JRadioButton();
        RB_tardeF = new javax.swing.JRadioButton();
        jSeparator66 = new javax.swing.JSeparator();
        RB_manhaG = new javax.swing.JRadioButton();
        RB_tardeG = new javax.swing.JRadioButton();
        serieGG = new javax.swing.JTextField();
        jSeparator77 = new javax.swing.JSeparator();
        jSeparator88 = new javax.swing.JSeparator();
        RB_tardeH = new javax.swing.JRadioButton();
        RB_manhaH = new javax.swing.JRadioButton();
        serieHH = new javax.swing.JTextField();
        RB_manhaA = new javax.swing.JRadioButton();
        RB_tardeA = new javax.swing.JRadioButton();
        serieAA = new javax.swing.JTextField();
        jSeparator11 = new javax.swing.JSeparator();
        jSeparator22 = new javax.swing.JSeparator();
        RB_tardeB = new javax.swing.JRadioButton();
        RB_manhaB = new javax.swing.JRadioButton();
        serieBB = new javax.swing.JTextField();
        RB_manhaC = new javax.swing.JRadioButton();
        RB_tardeC = new javax.swing.JRadioButton();
        serieCC = new javax.swing.JTextField();
        jSeparator33 = new javax.swing.JSeparator();
        jSeparator44 = new javax.swing.JSeparator();
        RB_tardeD = new javax.swing.JRadioButton();
        RB_manhaD = new javax.swing.JRadioButton();
        serieDD = new javax.swing.JTextField();
        jButton13 = new javax.swing.JButton();
        jButton14 = new javax.swing.JButton();
        buttonGroup4 = new javax.swing.ButtonGroup();
        buttonGroup5 = new javax.swing.ButtonGroup();
        buttonGroup6 = new javax.swing.ButtonGroup();
        buttonGroup7 = new javax.swing.ButtonGroup();
        buttonGroup8 = new javax.swing.ButtonGroup();
        jDialog1 = new javax.swing.JDialog();
        jPanel11 = new javax.swing.JPanel();
        jl_Pesquisar_prof = new javax.swing.JLabel();
        JTF_Pesquisar_prof = new javax.swing.JTextField();
        jScrollPane2_prof = new javax.swing.JScrollPane();
        jTTabela_Prof_prof = new javax.swing.JTable();
        jDialog2 = new javax.swing.JDialog();
        jPanel12 = new javax.swing.JPanel();
        jl_Pesquisar1_prof = new javax.swing.JLabel();
        JTF_Pesquisarmaterias_prof = new javax.swing.JTextField();
        jScrollPane3_prof = new javax.swing.JScrollPane();
        jTTabela_Disc_prof = new javax.swing.JTable();
        timer1 = new org.netbeans.examples.lib.timerbean.Timer();
        jDialog3 = new javax.swing.JDialog();
        jPanel13 = new javax.swing.JPanel();
        jl_Pesquisar2_prof = new javax.swing.JLabel();
        JTF_Pesquisarmaterias1_prof = new javax.swing.JTextField();
        jScrollPane5_prof = new javax.swing.JScrollPane();
        jTTabela_Disc1_prof = new javax.swing.JTable();
        jDialog4 = new javax.swing.JDialog();
        jPanel14 = new javax.swing.JPanel();
        jl_Pesquisar2_prof1 = new javax.swing.JLabel();
        JTF_Pesquisarmaterias1_prof1 = new javax.swing.JTextField();
        jScrollPane5_prof1 = new javax.swing.JScrollPane();
        jTTabela_Disc_prof_reg = new javax.swing.JTable();
        jPanel1 = new javax.swing.JPanel();
        jB_curso = new javax.swing.JButton();
        jB_serie = new javax.swing.JButton();
        jB_ha = new javax.swing.JButton();
        jB_layout = new javax.swing.JButton();
        jB_disciplina = new javax.swing.JButton();
        jB_prof = new javax.swing.JButton();
        jB_relatorio = new javax.swing.JButton();
        jLabel1_sgh = new javax.swing.JLabel();
        jPanel_prof = new javax.swing.JPanel();
        jDesktopPane1_prof = new javax.swing.JDesktopPane();
        jPanel1_prof = new javax.swing.JPanel();
        jSeparator1_prof = new javax.swing.JSeparator();
        disc5_prof = new javax.swing.JTextField();
        JLDisc5_prof = new javax.swing.JLabel();
        jRB_edt_del_prof = new javax.swing.JRadioButton();
        jRB_adicionar_prof = new javax.swing.JRadioButton();
        jl_nome_prof = new javax.swing.JLabel();
        jl_turma_prof = new javax.swing.JLabel();
        jTF_Carga_horaria_prof = new javax.swing.JTextField();
        jl_carga_horaria_prof = new javax.swing.JLabel();
        disc2_prof = new javax.swing.JTextField();
        jTF_nome_prof = new javax.swing.JTextField();
        jRB_regular_prof = new javax.swing.JRadioButton();
        jRB_profissional_prof = new javax.swing.JRadioButton();
        jl_eixo_prof = new javax.swing.JLabel();
        disc3_prof = new javax.swing.JTextField();
        disc4_prof = new javax.swing.JTextField();
        disc1_prof = new javax.swing.JTextField();
        jScrollPane1_prof = new javax.swing.JScrollPane();
        jTable2 = new javax.swing.JTable();
        jl_disciplina_prof = new javax.swing.JLabel();
        jl_aulas_prof = new javax.swing.JLabel();
        serie2_prof = new javax.swing.JTextField();
        serie3_prof = new javax.swing.JTextField();
        serie1_prof = new javax.swing.JTextField();
        serieC1 = new javax.swing.JTextField();
        serieC2 = new javax.swing.JTextField();
        serieC3 = new javax.swing.JTextField();
        jl_serie_prof = new javax.swing.JLabel();
        serieD1 = new javax.swing.JTextField();
        serieD2 = new javax.swing.JTextField();
        serieD3 = new javax.swing.JTextField();
        serieE1 = new javax.swing.JTextField();
        serieE2 = new javax.swing.JTextField();
        serieE3 = new javax.swing.JTextField();
        serieF1 = new javax.swing.JTextField();
        serieF2 = new javax.swing.JTextField();
        serieF3 = new javax.swing.JTextField();
        serieG1 = new javax.swing.JTextField();
        serieG2 = new javax.swing.JTextField();
        serieG3 = new javax.swing.JTextField();
        serieH1 = new javax.swing.JTextField();
        serieH2 = new javax.swing.JTextField();
        serieH3 = new javax.swing.JTextField();
        serieA1 = new javax.swing.JTextField();
        serieA2 = new javax.swing.JTextField();
        serieA3 = new javax.swing.JTextField();
        serieB1 = new javax.swing.JTextField();
        serieB2 = new javax.swing.JTextField();
        serieB3 = new javax.swing.JTextField();
        marcar = new javax.swing.JLabel();
        desmarcar = new javax.swing.JLabel();
        JLA1 = new javax.swing.JLabel();
        JLA3 = new javax.swing.JLabel();
        JLB1 = new javax.swing.JLabel();
        JLB2 = new javax.swing.JLabel();
        JLB3 = new javax.swing.JLabel();
        JLC2 = new javax.swing.JLabel();
        JLC3 = new javax.swing.JLabel();
        JLC1 = new javax.swing.JLabel();
        JLD3 = new javax.swing.JLabel();
        JLD2 = new javax.swing.JLabel();
        JLD1 = new javax.swing.JLabel();
        JLE3 = new javax.swing.JLabel();
        JLE2 = new javax.swing.JLabel();
        JLE1 = new javax.swing.JLabel();
        JLF3 = new javax.swing.JLabel();
        JLF1 = new javax.swing.JLabel();
        JLF2 = new javax.swing.JLabel();
        JLG3 = new javax.swing.JLabel();
        JLG2 = new javax.swing.JLabel();
        JLG1 = new javax.swing.JLabel();
        JLH1 = new javax.swing.JLabel();
        JLH2 = new javax.swing.JLabel();
        JLH3 = new javax.swing.JLabel();
        JLA2 = new javax.swing.JLabel();
        EixoP_prof = new javax.swing.JTextField();
        EixoR_prof = new javax.swing.JTextField();
        JLR_prof = new javax.swing.JLabel();
        JLP_prof = new javax.swing.JLabel();
        JLDisc2 = new javax.swing.JLabel();
        JLDisc3 = new javax.swing.JLabel();
        JLDisc4 = new javax.swing.JLabel();
        JLDisc1 = new javax.swing.JLabel();
        jLabel1 = new javax.swing.JLabel();
        jLabel2_prof = new javax.swing.JLabel();
        jScrollPane4_prof = new javax.swing.JScrollPane();
        jTable1 = new javax.swing.JTable();
        buton_editar_prof = new javax.swing.JButton();
        buton_adicionar_prof = new javax.swing.JButton();
        buton_deletar_prof = new javax.swing.JButton();
        jPanel_hora_aula = new javax.swing.JPanel();
        jDesktopPane5 = new javax.swing.JDesktopPane();
        jPanel6 = new javax.swing.JPanel();
        jScrollPane3 = new javax.swing.JScrollPane();
        jTTabela_HA2 = new javax.swing.JTable();
        jL_deletar_ha = new javax.swing.JButton();
        jL_adicionar_ha = new javax.swing.JButton();
        jL_editar_ha = new javax.swing.JButton();
        jLabel3_ha = new javax.swing.JButton();
        jLabel1_ha = new javax.swing.JButton();
        jLabel2_ha = new javax.swing.JButton();
        jLabel4_ha = new javax.swing.JButton();
        jSeparator1_ha = new javax.swing.JSeparator();
        jRB_adicionar_ha = new javax.swing.JRadioButton();
        jRB_deletar_ha = new javax.swing.JRadioButton();
        jRB_visualizar_ha = new javax.swing.JRadioButton();
        jTF_totalHA_ha = new javax.swing.JTextField();
        jl_Totalha_ha = new javax.swing.JLabel();
        jl_descricao1_ha = new javax.swing.JLabel();
        jCB_descricao1_ha = new javax.swing.JComboBox();
        jl_serie1_ha = new javax.swing.JLabel();
        jRB_1_ha = new javax.swing.JRadioButton();
        jRB_2_ha = new javax.swing.JRadioButton();
        jRB_3_ha = new javax.swing.JRadioButton();
        jCB_ano_ha = new javax.swing.JComboBox();
        jCB_descricao_ha = new javax.swing.JComboBox();
        jl_ano_ha = new javax.swing.JLabel();
        jl_descricao_ha = new javax.swing.JLabel();
        jl_nome_ha = new javax.swing.JLabel();
        CB_Professor_ha = new javax.swing.JComboBox();
        jCB_disciplina_ha = new javax.swing.JComboBox();
        jl_disciplina_ha = new javax.swing.JLabel();
        jl_horaaula_ha = new javax.swing.JLabel();
        jTF_horaaula_ha = new javax.swing.JTextField();
        jScrollPane4 = new javax.swing.JScrollPane();
        jTTable_hora_aula = new javax.swing.JTable();
        RB_Professor_ha = new javax.swing.JRadioButton();
        RB_Materia_ha = new javax.swing.JRadioButton();
        jl_eixo_ha = new javax.swing.JLabel();
        jl_hora_aulas_ha = new javax.swing.JTextField();
        jl_eixo1_ha = new javax.swing.JLabel();
        jl_eixo2_ha = new javax.swing.JLabel();
        jl_eixo3_ha = new javax.swing.JLabel();
        jl_eixo4_ha = new javax.swing.JLabel();
        jlpesquisa_ha = new javax.swing.JLabel();
        JTF_Pesquisar2_ha = new javax.swing.JTextField();
        jl_serie_ha = new javax.swing.JTextField();
        jl_turma_ha = new javax.swing.JTextField();
        jl_materia_ha = new javax.swing.JTextField();
        jl_prof_ha = new javax.swing.JTextField();
        jL_deletar1_ha = new javax.swing.JButton();
        jPanel_curso = new javax.swing.JPanel();
        jDesktopPane1 = new javax.swing.JDesktopPane();
        jPanel2 = new javax.swing.JPanel();
        jSeparator1_curso = new javax.swing.JSeparator();
        jRB_editar_curso = new javax.swing.JRadioButton();
        jRB_adicionar_curso = new javax.swing.JRadioButton();
        jRB_deletar_curso = new javax.swing.JRadioButton();
        jTF_nomecurso_curso = new javax.swing.JTextField();
        jl_descricao_curso = new javax.swing.JLabel();
        jTF_descricaonovo_curso = new javax.swing.JTextField();
        jTF_descricao_curso = new javax.swing.JTextField();
        jl_descricao3_curso = new javax.swing.JLabel();
        jl_curso3_curso = new javax.swing.JLabel();
        jl_curso2_curso = new javax.swing.JLabel();
        jCB_curso1_curso = new javax.swing.JComboBox();
        jCB_descricao1_curso = new javax.swing.JComboBox();
        jl_curso_curso = new javax.swing.JLabel();
        jCB_descricao_curso = new javax.swing.JComboBox();
        jCB_curso_curso = new javax.swing.JComboBox();
        jTF_cursonovo_curso = new javax.swing.JTextField();
        jl_descricao2_curso = new javax.swing.JLabel();
        buton_deletar_curso = new javax.swing.JButton();
        buton_adicionar_curso = new javax.swing.JButton();
        buton_editar_curso = new javax.swing.JButton();
        jPanel_serie = new javax.swing.JPanel();
        jDesktopPane2 = new javax.swing.JDesktopPane();
        jPanel3 = new javax.swing.JPanel();
        jSeparator1_serie = new javax.swing.JSeparator();
        jRB_adicionar_serie = new javax.swing.JRadioButton();
        jRB_deletar_serie = new javax.swing.JRadioButton();
        jl_serie_serie = new javax.swing.JLabel();
        jRB_1_serie = new javax.swing.JRadioButton();
        jRB_3_serie = new javax.swing.JRadioButton();
        jCB_curso_serie = new javax.swing.JComboBox();
        jl_curso_serie = new javax.swing.JLabel();
        jl_descricao_serie = new javax.swing.JLabel();
        jCB_descricao_serie = new javax.swing.JComboBox();
        jRB_2_serie = new javax.swing.JRadioButton();
        jScrollPane5 = new javax.swing.JScrollPane();
        jTTabela_Serie = new javax.swing.JTable();
        buton_adicionar_serie = new javax.swing.JButton();
        buton_deletar_serie = new javax.swing.JButton();
        jPanel_disciplina = new javax.swing.JPanel();
        jDesktopPane3 = new javax.swing.JDesktopPane();
        jPanel4 = new javax.swing.JPanel();
        jSeparator1_disc = new javax.swing.JSeparator();
        buton_deletar_disc = new javax.swing.JButton();
        buton_editar_disc = new javax.swing.JButton();
        buton_adicionar_disc = new javax.swing.JButton();
        jRB_edt_del_disc = new javax.swing.JRadioButton();
        jRB_adicionar_disc = new javax.swing.JRadioButton();
        jRB_visualizar_disc = new javax.swing.JRadioButton();
        jL_ok_disc = new javax.swing.JButton();
        jl_nome_disc = new javax.swing.JLabel();
        jTF_nomedisc_disc = new javax.swing.JTextField();
        jl_eixo_disc = new javax.swing.JLabel();
        jRB_regular_disc = new javax.swing.JRadioButton();
        jRB_profissional_disc = new javax.swing.JRadioButton();
        jCB_curso_disc = new javax.swing.JComboBox();
        jl_curso_disc = new javax.swing.JLabel();
        jCB_curso1_disc = new javax.swing.JComboBox();
        jl_curso2_disc = new javax.swing.JLabel();
        jScrollPane1 = new javax.swing.JScrollPane();
        jTTable_disc = new javax.swing.JTable();
        jTF_pesquisar_disc = new javax.swing.JTextField();
        jl_pesquisar_disc = new javax.swing.JLabel();
        jScrollPane2 = new javax.swing.JScrollPane();
        jTTabela_Disc2 = new javax.swing.JTable();
        jCB_cursoalt_disc = new javax.swing.JComboBox();
        jl_nomealt_disc = new javax.swing.JLabel();
        jl_cursoalt_disc = new javax.swing.JLabel();
        jRB_profissionalalt_disc = new javax.swing.JRadioButton();
        jRB_regularalt_disc = new javax.swing.JRadioButton();
        jl_eixoalt_disc = new javax.swing.JLabel();
        jTF_nomediscalt_disc = new javax.swing.JTextField();
        jLabel2_disc = new javax.swing.JLabel();

        jD_aula10.addWindowListener(new java.awt.event.WindowAdapter() {
            public void windowClosing(java.awt.event.WindowEvent evt) {
                jD_aula10WindowClosing(evt);
            }
            public void windowClosed(java.awt.event.WindowEvent evt) {
                jD_aula10WindowClosed(evt);
            }
        });

        jPanel10.setLayout(null);

        jSeparator4.setOrientation(javax.swing.SwingConstants.VERTICAL);
        jPanel10.add(jSeparator4);
        jSeparator4.setBounds(31, 10, 10, 310);

        jCheckBox111.setFont(new java.awt.Font("Tahoma", 0, 14)); // NOI18N
        jCheckBox111.setFocusPainted(false);
        jPanel10.add(jCheckBox111);
        jCheckBox111.setBounds(60, 50, 270, 21);

        jCheckBox333.setFont(new java.awt.Font("Tahoma", 0, 14)); // NOI18N
        jCheckBox333.setFocusPainted(false);
        jPanel10.add(jCheckBox333);
        jCheckBox333.setBounds(60, 80, 270, 21);

        jCheckBox555.setFont(new java.awt.Font("Tahoma", 0, 14)); // NOI18N
        jCheckBox555.setFocusPainted(false);
        jPanel10.add(jCheckBox555);
        jCheckBox555.setBounds(60, 110, 270, 21);

        jCheckBox777.setFont(new java.awt.Font("Tahoma", 0, 14)); // NOI18N
        jCheckBox777.setFocusPainted(false);
        jPanel10.add(jCheckBox777);
        jCheckBox777.setBounds(60, 140, 270, 21);

        jCheckBox222.setFont(new java.awt.Font("Tahoma", 0, 14)); // NOI18N
        jCheckBox222.setFocusPainted(false);
        jPanel10.add(jCheckBox222);
        jCheckBox222.setBounds(350, 50, 280, 21);

        jCheckBox444.setFont(new java.awt.Font("Tahoma", 0, 14)); // NOI18N
        jCheckBox444.setFocusPainted(false);
        jPanel10.add(jCheckBox444);
        jCheckBox444.setBounds(350, 80, 280, 21);

        jCheckBox666.setFont(new java.awt.Font("Tahoma", 0, 14)); // NOI18N
        jCheckBox666.setFocusPainted(false);
        jPanel10.add(jCheckBox666);
        jCheckBox666.setBounds(350, 110, 280, 21);

        jCheckBox888.setFont(new java.awt.Font("Tahoma", 0, 14)); // NOI18N
        jCheckBox888.setFocusPainted(false);
        jPanel10.add(jCheckBox888);
        jCheckBox888.setBounds(350, 140, 280, 21);

        jCheckBox999.setFont(new java.awt.Font("Tahoma", 0, 14)); // NOI18N
        jCheckBox999.setFocusPainted(false);
        jPanel10.add(jCheckBox999);
        jCheckBox999.setBounds(60, 170, 270, 21);

        jCheckBox100.setFont(new java.awt.Font("Tahoma", 0, 14)); // NOI18N
        jCheckBox100.setFocusPainted(false);
        jPanel10.add(jCheckBox100);
        jCheckBox100.setBounds(350, 170, 280, 21);

        jCheckBox120.setFont(new java.awt.Font("Tahoma", 0, 14)); // NOI18N
        jCheckBox120.setFocusPainted(false);
        jPanel10.add(jCheckBox120);
        jCheckBox120.setBounds(350, 200, 280, 21);

        jCheckBox110.setFont(new java.awt.Font("Tahoma", 0, 14)); // NOI18N
        jCheckBox110.setFocusPainted(false);
        jPanel10.add(jCheckBox110);
        jCheckBox110.setBounds(60, 200, 270, 21);

        jCheckBox130.setFont(new java.awt.Font("Tahoma", 0, 14)); // NOI18N
        jCheckBox130.setFocusPainted(false);
        jPanel10.add(jCheckBox130);
        jCheckBox130.setBounds(60, 230, 270, 21);

        jCheckBox140.setFont(new java.awt.Font("Tahoma", 0, 14)); // NOI18N
        jCheckBox140.setFocusPainted(false);
        jPanel10.add(jCheckBox140);
        jCheckBox140.setBounds(350, 230, 280, 21);

        jCheckBox160.setFont(new java.awt.Font("Tahoma", 0, 14)); // NOI18N
        jCheckBox160.setFocusPainted(false);
        jPanel10.add(jCheckBox160);
        jCheckBox160.setBounds(350, 260, 280, 21);

        jCheckBox150.setFont(new java.awt.Font("Tahoma", 0, 14)); // NOI18N
        jCheckBox150.setFocusPainted(false);
        jPanel10.add(jCheckBox150);
        jCheckBox150.setBounds(60, 260, 270, 21);

        jCheckBox180.setFont(new java.awt.Font("Tahoma", 0, 14)); // NOI18N
        jCheckBox180.setFocusPainted(false);
        jPanel10.add(jCheckBox180);
        jCheckBox180.setBounds(350, 290, 280, 21);

        jCheckBox170.setFont(new java.awt.Font("Tahoma", 0, 14)); // NOI18N
        jCheckBox170.setFocusPainted(false);
        jPanel10.add(jCheckBox170);
        jCheckBox170.setBounds(60, 290, 270, 21);

        jLabel2.setFont(new java.awt.Font("Tahoma", 0, 14)); // NOI18N
        jLabel2.setText("Quais professores estarão disponíveis em uma 10º aula?");
        jPanel10.add(jLabel2);
        jLabel2.setBounds(50, 10, 350, 30);

        jButton15.setFont(new java.awt.Font("Tahoma", 0, 14)); // NOI18N
        jButton15.setText("Voltar");
        jButton15.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButton15ActionPerformed(evt);
            }
        });
        jPanel10.add(jButton15);
        jButton15.setBounds(20, 340, 120, 40);

        jButton16.setFont(new java.awt.Font("Tahoma", 0, 14)); // NOI18N
        jButton16.setText("Ok");
        jButton16.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButton16ActionPerformed(evt);
            }
        });
        jPanel10.add(jButton16);
        jButton16.setBounds(520, 340, 90, 40);

        javax.swing.GroupLayout jD_aula10Layout = new javax.swing.GroupLayout(jD_aula10.getContentPane());
        jD_aula10.getContentPane().setLayout(jD_aula10Layout);
        jD_aula10Layout.setHorizontalGroup(
            jD_aula10Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addComponent(jPanel10, javax.swing.GroupLayout.PREFERRED_SIZE, 656, javax.swing.GroupLayout.PREFERRED_SIZE)
        );
        jD_aula10Layout.setVerticalGroup(
            jD_aula10Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addComponent(jPanel10, javax.swing.GroupLayout.PREFERRED_SIZE, 404, javax.swing.GroupLayout.PREFERRED_SIZE)
        );

        jFileChooser1.setFileSelectionMode(javax.swing.JFileChooser.DIRECTORIES_ONLY);
        jFileChooser1.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jFileChooser1ActionPerformed(evt);
            }
        });

        javax.swing.GroupLayout jD_salvaLayout = new javax.swing.GroupLayout(jD_salva.getContentPane());
        jD_salva.getContentPane().setLayout(jD_salvaLayout);
        jD_salvaLayout.setHorizontalGroup(
            jD_salvaLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jD_salvaLayout.createSequentialGroup()
                .addComponent(jFileChooser1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addGap(0, 0, Short.MAX_VALUE))
        );
        jD_salvaLayout.setVerticalGroup(
            jD_salvaLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jD_salvaLayout.createSequentialGroup()
                .addComponent(jFileChooser1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addGap(0, 0, Short.MAX_VALUE))
        );

        jDesktopPane6.setBackground(new java.awt.Color(255, 255, 255));
        jDesktopPane6.setForeground(new java.awt.Color(255, 255, 255));

        jPanel7.setLayout(null);

        jSeparator1.setOrientation(javax.swing.SwingConstants.VERTICAL);
        jPanel7.add(jSeparator1);
        jSeparator1.setBounds(30, 10, 11, 190);

        jl_serie.setBackground(new java.awt.Color(0, 0, 0));
        jl_serie.setFont(new java.awt.Font("Tahoma", 0, 14)); // NOI18N
        jl_serie.setText("Qual Relatorio deseja gerar ?");
        jPanel7.add(jl_serie);
        jl_serie.setBounds(160, 40, 180, 30);

        jButton_gc.setFont(new java.awt.Font("Tahoma", 0, 14)); // NOI18N
        jButton_gc.setText("Grades Curriculares");
        jButton_gc.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButton_gcActionPerformed(evt);
            }
        });
        jPanel7.add(jButton_gc);
        jButton_gc.setBounds(280, 110, 170, 40);

        jButton_horario.setFont(new java.awt.Font("Tahoma", 0, 14)); // NOI18N
        jButton_horario.setText("Horário");
        jButton_horario.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButton_horarioActionPerformed(evt);
            }
        });
        jPanel7.add(jButton_horario);
        jButton_horario.setBounds(50, 110, 170, 40);

        jPanel7.setBounds(0, 0, 500, 240);
        jDesktopPane6.add(jPanel7, javax.swing.JLayeredPane.DEFAULT_LAYER);

        javax.swing.GroupLayout jD_esc_relLayout = new javax.swing.GroupLayout(jD_esc_rel.getContentPane());
        jD_esc_rel.getContentPane().setLayout(jD_esc_relLayout);
        jD_esc_relLayout.setHorizontalGroup(
            jD_esc_relLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addComponent(jDesktopPane6, javax.swing.GroupLayout.DEFAULT_SIZE, 480, Short.MAX_VALUE)
        );
        jD_esc_relLayout.setVerticalGroup(
            jD_esc_relLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addComponent(jDesktopPane6, javax.swing.GroupLayout.DEFAULT_SIZE, 220, Short.MAX_VALUE)
        );

        jD_grade_curricular.addWindowListener(new java.awt.event.WindowAdapter() {
            public void windowClosing(java.awt.event.WindowEvent evt) {
                jD_grade_curricularWindowClosing(evt);
            }
            public void windowClosed(java.awt.event.WindowEvent evt) {
                jD_grade_curricularWindowClosed(evt);
            }
        });

        jDesktopPane4.setBackground(new java.awt.Color(255, 255, 255));

        jPanel5.setLayout(null);

        jSeparator2.setOrientation(javax.swing.SwingConstants.VERTICAL);
        jPanel5.add(jSeparator2);
        jSeparator2.setBounds(30, 10, 11, 300);

        jCheckBox1.setFont(new java.awt.Font("Tahoma", 0, 14)); // NOI18N
        jCheckBox1.setFocusPainted(false);
        jPanel5.add(jCheckBox1);
        jCheckBox1.setBounds(70, 31, 270, 30);

        jCheckBox2.setFont(new java.awt.Font("Tahoma", 0, 14)); // NOI18N
        jCheckBox2.setFocusPainted(false);
        jPanel5.add(jCheckBox2);
        jCheckBox2.setBounds(70, 81, 270, 30);

        jCheckBox3.setFont(new java.awt.Font("Tahoma", 0, 14)); // NOI18N
        jCheckBox3.setFocusPainted(false);
        jPanel5.add(jCheckBox3);
        jCheckBox3.setBounds(70, 131, 270, 30);

        jCheckBox4.setFont(new java.awt.Font("Tahoma", 0, 14)); // NOI18N
        jCheckBox4.setFocusPainted(false);
        jPanel5.add(jCheckBox4);
        jCheckBox4.setBounds(70, 181, 270, 30);

        jCheckBox5.setFont(new java.awt.Font("Tahoma", 0, 14)); // NOI18N
        jCheckBox5.setFocusPainted(false);
        jPanel5.add(jCheckBox5);
        jCheckBox5.setBounds(360, 31, 280, 30);

        jCheckBox6.setFont(new java.awt.Font("Tahoma", 0, 14)); // NOI18N
        jCheckBox6.setFocusPainted(false);
        jPanel5.add(jCheckBox6);
        jCheckBox6.setBounds(360, 81, 280, 30);

        jCheckBox7.setFont(new java.awt.Font("Tahoma", 0, 14)); // NOI18N
        jCheckBox7.setFocusPainted(false);
        jPanel5.add(jCheckBox7);
        jCheckBox7.setBounds(360, 131, 280, 30);

        jCheckBox8.setFont(new java.awt.Font("Tahoma", 0, 14)); // NOI18N
        jCheckBox8.setFocusPainted(false);
        jPanel5.add(jCheckBox8);
        jCheckBox8.setBounds(360, 181, 280, 30);

        jButton10.setFont(new java.awt.Font("Tahoma", 0, 14)); // NOI18N
        jButton10.setText("Voltar");
        jButton10.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButton10ActionPerformed(evt);
            }
        });
        jPanel5.add(jButton10);
        jButton10.setBounds(70, 270, 160, 40);

        jButton11.setFont(new java.awt.Font("Tahoma", 0, 14)); // NOI18N
        jButton11.setText("Gerar");
        jButton11.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButton11ActionPerformed(evt);
            }
        });
        jPanel5.add(jButton11);
        jButton11.setBounds(480, 270, 160, 40);

        jPanel5.setBounds(0, 0, 700, 350);
        jDesktopPane4.add(jPanel5, javax.swing.JLayeredPane.DEFAULT_LAYER);

        javax.swing.GroupLayout jD_grade_curricularLayout = new javax.swing.GroupLayout(jD_grade_curricular.getContentPane());
        jD_grade_curricular.getContentPane().setLayout(jD_grade_curricularLayout);
        jD_grade_curricularLayout.setHorizontalGroup(
            jD_grade_curricularLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addComponent(jDesktopPane4, javax.swing.GroupLayout.DEFAULT_SIZE, 690, Short.MAX_VALUE)
        );
        jD_grade_curricularLayout.setVerticalGroup(
            jD_grade_curricularLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addComponent(jDesktopPane4, javax.swing.GroupLayout.DEFAULT_SIZE, 331, Short.MAX_VALUE)
        );

        jDesktopPane7.setBackground(new java.awt.Color(255, 255, 255));

        jPanel8.setLayout(null);

        jSeparator3.setOrientation(javax.swing.SwingConstants.VERTICAL);
        jPanel8.add(jSeparator3);
        jSeparator3.setBounds(30, 10, 11, 220);

        jl_serie1.setBackground(new java.awt.Color(0, 0, 0));
        jl_serie1.setFont(new java.awt.Font("Tahoma", 0, 14)); // NOI18N
        jl_serie1.setText("Alguma das turmas encontra-se em Estagio?");
        jPanel8.add(jl_serie1);
        jl_serie1.setBounds(110, 30, 290, 30);

        jButton8.setFont(new java.awt.Font("Tahoma", 0, 14)); // NOI18N
        jButton8.setText("Sim");
        jButton8.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButton8ActionPerformed(evt);
            }
        });
        jPanel8.add(jButton8);
        jButton8.setBounds(140, 100, 70, 40);

        jButton9.setFont(new java.awt.Font("Tahoma", 0, 14)); // NOI18N
        jButton9.setText("Não");
        jButton9.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButton9ActionPerformed(evt);
            }
        });
        jPanel8.add(jButton9);
        jButton9.setBounds(260, 100, 70, 40);

        jButton12.setFont(new java.awt.Font("Tahoma", 0, 14)); // NOI18N
        jButton12.setText("Voltar");
        jButton12.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButton12ActionPerformed(evt);
            }
        });
        jPanel8.add(jButton12);
        jButton12.setBounds(40, 190, 130, 40);

        jPanel8.setBounds(0, 0, 460, 270);
        jDesktopPane7.add(jPanel8, javax.swing.JLayeredPane.DEFAULT_LAYER);

        javax.swing.GroupLayout jD_snLayout = new javax.swing.GroupLayout(jD_sn.getContentPane());
        jD_sn.getContentPane().setLayout(jD_snLayout);
        jD_snLayout.setHorizontalGroup(
            jD_snLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 449, Short.MAX_VALUE)
            .addGroup(jD_snLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                .addComponent(jDesktopPane7, javax.swing.GroupLayout.DEFAULT_SIZE, 449, Short.MAX_VALUE))
        );
        jD_snLayout.setVerticalGroup(
            jD_snLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 253, Short.MAX_VALUE)
            .addGroup(jD_snLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                .addComponent(jDesktopPane7, javax.swing.GroupLayout.DEFAULT_SIZE, 253, Short.MAX_VALUE))
        );

        jPanel9.setLayout(null);

        jSeparator55.setPreferredSize(new java.awt.Dimension(3, 0));
        jPanel9.add(jSeparator55);
        jSeparator55.setBounds(80, 430, 220, 10);

        jl_serie2.setBackground(new java.awt.Color(0, 0, 0));
        jl_serie2.setFont(new java.awt.Font("Tahoma", 0, 14)); // NOI18N
        jl_serie2.setText("Serie");
        jPanel9.add(jl_serie2);
        jl_serie2.setBounds(70, 60, 40, 30);

        jl_serie3.setBackground(new java.awt.Color(0, 0, 0));
        jl_serie3.setFont(new java.awt.Font("Tahoma", 0, 14)); // NOI18N
        jl_serie3.setText("Turma");
        jPanel9.add(jl_serie3);
        jl_serie3.setBounds(10, 160, 50, 30);

        jl_serie4.setBackground(new java.awt.Color(0, 0, 0));
        jl_serie4.setFont(new java.awt.Font("Tahoma", 0, 14)); // NOI18N
        jl_serie4.setText("Quais turnos as turmas encontra-se em Estagio?");
        jPanel9.add(jl_serie4);
        jl_serie4.setBounds(10, 20, 310, 30);

        jSeparator5.setOrientation(javax.swing.SwingConstants.VERTICAL);
        jSeparator5.setPreferredSize(new java.awt.Dimension(3, 0));
        jPanel9.add(jSeparator5);
        jSeparator5.setBounds(60, 70, 11, 490);

        serieEE.setEditable(false);
        serieEE.setFont(new java.awt.Font("Tahoma", 0, 14)); // NOI18N
        serieEE.setHorizontalAlignment(javax.swing.JTextField.CENTER);
        serieEE.setText("E");
        serieEE.setBorder(new javax.swing.border.LineBorder(new java.awt.Color(0, 0, 0), 1, true));
        serieEE.setCaretColor(new java.awt.Color(255, 255, 255));
        jPanel9.add(serieEE);
        serieEE.setBounds(80, 370, 40, 40);

        jSeparator6.setBackground(new java.awt.Color(0, 0, 0));
        jSeparator6.setForeground(new java.awt.Color(0, 0, 0));
        jPanel9.add(jSeparator6);
        jSeparator6.setBounds(210, 250, 0, 2);

        serieextra.setEditable(false);
        serieextra.setFont(new java.awt.Font("Tahoma", 0, 14)); // NOI18N
        serieextra.setHorizontalAlignment(javax.swing.JTextField.CENTER);
        serieextra.setText("3");
        serieextra.setBorder(new javax.swing.border.LineBorder(new java.awt.Color(0, 0, 0), 1, true));
        serieextra.setCaretColor(new java.awt.Color(255, 255, 255));
        jPanel9.add(serieextra);
        serieextra.setBounds(100, 90, 60, 40);

        buttonGroup5.add(RB_manhaE);
        RB_manhaE.setFont(new java.awt.Font("Tahoma", 0, 14)); // NOI18N
        RB_manhaE.setText("Manhã");
        RB_manhaE.setFocusPainted(false);
        RB_manhaE.addItemListener(new java.awt.event.ItemListener() {
            public void itemStateChanged(java.awt.event.ItemEvent evt) {
                RB_manhaEItemStateChanged(evt);
            }
        });
        jPanel9.add(RB_manhaE);
        RB_manhaE.setBounds(150, 350, 80, 25);

        buttonGroup5.add(RB_tardeE);
        RB_tardeE.setFont(new java.awt.Font("Tahoma", 0, 14)); // NOI18N
        RB_tardeE.setText("Tarde");
        RB_tardeE.setFocusPainted(false);
        RB_tardeE.addItemListener(new java.awt.event.ItemListener() {
            public void itemStateChanged(java.awt.event.ItemEvent evt) {
                RB_tardeEItemStateChanged(evt);
            }
        });
        jPanel9.add(RB_tardeE);
        RB_tardeE.setBounds(150, 390, 70, 25);

        jSeparator7.setPreferredSize(new java.awt.Dimension(3, 0));
        jPanel9.add(jSeparator7);
        jSeparator7.setBounds(10, 140, 590, 10);

        serieFF.setEditable(false);
        serieFF.setFont(new java.awt.Font("Tahoma", 0, 14)); // NOI18N
        serieFF.setHorizontalAlignment(javax.swing.JTextField.CENTER);
        serieFF.setText("F");
        serieFF.setBorder(new javax.swing.border.LineBorder(new java.awt.Color(0, 0, 0), 1, true));
        serieFF.setCaretColor(new java.awt.Color(255, 255, 255));
        jPanel9.add(serieFF);
        serieFF.setBounds(380, 370, 40, 40);

        buttonGroup6.add(RB_manhaF);
        RB_manhaF.setFont(new java.awt.Font("Tahoma", 0, 14)); // NOI18N
        RB_manhaF.setText("Manhã");
        RB_manhaF.setFocusPainted(false);
        RB_manhaF.addItemListener(new java.awt.event.ItemListener() {
            public void itemStateChanged(java.awt.event.ItemEvent evt) {
                RB_manhaFItemStateChanged(evt);
            }
        });
        jPanel9.add(RB_manhaF);
        RB_manhaF.setBounds(450, 350, 80, 25);

        buttonGroup6.add(RB_tardeF);
        RB_tardeF.setFont(new java.awt.Font("Tahoma", 0, 14)); // NOI18N
        RB_tardeF.setText("Tarde");
        RB_tardeF.setFocusPainted(false);
        RB_tardeF.addItemListener(new java.awt.event.ItemListener() {
            public void itemStateChanged(java.awt.event.ItemEvent evt) {
                RB_tardeFItemStateChanged(evt);
            }
        });
        jPanel9.add(RB_tardeF);
        RB_tardeF.setBounds(450, 390, 70, 25);

        jSeparator66.setPreferredSize(new java.awt.Dimension(3, 0));
        jPanel9.add(jSeparator66);
        jSeparator66.setBounds(380, 430, 220, 10);

        buttonGroup7.add(RB_manhaG);
        RB_manhaG.setFont(new java.awt.Font("Tahoma", 0, 14)); // NOI18N
        RB_manhaG.setText("Manhã");
        RB_manhaG.setFocusPainted(false);
        RB_manhaG.addItemListener(new java.awt.event.ItemListener() {
            public void itemStateChanged(java.awt.event.ItemEvent evt) {
                RB_manhaGItemStateChanged(evt);
            }
        });
        jPanel9.add(RB_manhaG);
        RB_manhaG.setBounds(150, 440, 80, 25);

        buttonGroup7.add(RB_tardeG);
        RB_tardeG.setFont(new java.awt.Font("Tahoma", 0, 14)); // NOI18N
        RB_tardeG.setText("Tarde");
        RB_tardeG.setFocusPainted(false);
        RB_tardeG.addItemListener(new java.awt.event.ItemListener() {
            public void itemStateChanged(java.awt.event.ItemEvent evt) {
                RB_tardeGItemStateChanged(evt);
            }
        });
        jPanel9.add(RB_tardeG);
        RB_tardeG.setBounds(150, 480, 70, 25);

        serieGG.setEditable(false);
        serieGG.setFont(new java.awt.Font("Tahoma", 0, 14)); // NOI18N
        serieGG.setHorizontalAlignment(javax.swing.JTextField.CENTER);
        serieGG.setText("G");
        serieGG.setBorder(new javax.swing.border.LineBorder(new java.awt.Color(0, 0, 0), 1, true));
        serieGG.setCaretColor(new java.awt.Color(255, 255, 255));
        jPanel9.add(serieGG);
        serieGG.setBounds(80, 460, 40, 40);

        jSeparator77.setPreferredSize(new java.awt.Dimension(3, 0));
        jPanel9.add(jSeparator77);
        jSeparator77.setBounds(80, 520, 220, 10);

        jSeparator88.setPreferredSize(new java.awt.Dimension(3, 0));
        jPanel9.add(jSeparator88);
        jSeparator88.setBounds(380, 520, 220, 10);

        buttonGroup8.add(RB_tardeH);
        RB_tardeH.setFont(new java.awt.Font("Tahoma", 0, 14)); // NOI18N
        RB_tardeH.setText("Tarde");
        RB_tardeH.setFocusPainted(false);
        RB_tardeH.addItemListener(new java.awt.event.ItemListener() {
            public void itemStateChanged(java.awt.event.ItemEvent evt) {
                RB_tardeHItemStateChanged(evt);
            }
        });
        jPanel9.add(RB_tardeH);
        RB_tardeH.setBounds(450, 480, 70, 25);

        buttonGroup8.add(RB_manhaH);
        RB_manhaH.setFont(new java.awt.Font("Tahoma", 0, 14)); // NOI18N
        RB_manhaH.setText("Manhã");
        RB_manhaH.setFocusPainted(false);
        RB_manhaH.addItemListener(new java.awt.event.ItemListener() {
            public void itemStateChanged(java.awt.event.ItemEvent evt) {
                RB_manhaHItemStateChanged(evt);
            }
        });
        jPanel9.add(RB_manhaH);
        RB_manhaH.setBounds(450, 440, 80, 25);

        serieHH.setEditable(false);
        serieHH.setFont(new java.awt.Font("Tahoma", 0, 14)); // NOI18N
        serieHH.setHorizontalAlignment(javax.swing.JTextField.CENTER);
        serieHH.setText("H");
        serieHH.setBorder(new javax.swing.border.LineBorder(new java.awt.Color(0, 0, 0), 1, true));
        serieHH.setCaretColor(new java.awt.Color(255, 255, 255));
        jPanel9.add(serieHH);
        serieHH.setBounds(380, 460, 40, 40);

        buttonGroup1.add(RB_manhaA);
        RB_manhaA.setFont(new java.awt.Font("Tahoma", 0, 14)); // NOI18N
        RB_manhaA.setText("Manhã");
        RB_manhaA.setFocusPainted(false);
        RB_manhaA.addItemListener(new java.awt.event.ItemListener() {
            public void itemStateChanged(java.awt.event.ItemEvent evt) {
                RB_manhaAItemStateChanged(evt);
            }
        });
        jPanel9.add(RB_manhaA);
        RB_manhaA.setBounds(150, 150, 90, 34);

        buttonGroup1.add(RB_tardeA);
        RB_tardeA.setFont(new java.awt.Font("Tahoma", 0, 14)); // NOI18N
        RB_tardeA.setText("Tarde");
        RB_tardeA.setFocusPainted(false);
        RB_tardeA.addItemListener(new java.awt.event.ItemListener() {
            public void itemStateChanged(java.awt.event.ItemEvent evt) {
                RB_tardeAItemStateChanged(evt);
            }
        });
        jPanel9.add(RB_tardeA);
        RB_tardeA.setBounds(150, 190, 90, 34);

        serieAA.setEditable(false);
        serieAA.setFont(new java.awt.Font("Tahoma", 0, 14)); // NOI18N
        serieAA.setHorizontalAlignment(javax.swing.JTextField.CENTER);
        serieAA.setText("A");
        serieAA.setBorder(new javax.swing.border.LineBorder(new java.awt.Color(0, 0, 0), 1, true));
        serieAA.setCaretColor(new java.awt.Color(255, 255, 255));
        jPanel9.add(serieAA);
        serieAA.setBounds(80, 170, 40, 40);

        jSeparator11.setPreferredSize(new java.awt.Dimension(3, 0));
        jPanel9.add(jSeparator11);
        jSeparator11.setBounds(80, 240, 220, 10);

        jSeparator22.setPreferredSize(new java.awt.Dimension(3, 0));
        jPanel9.add(jSeparator22);
        jSeparator22.setBounds(380, 240, 220, 10);

        buttonGroup2.add(RB_tardeB);
        RB_tardeB.setFont(new java.awt.Font("Tahoma", 0, 14)); // NOI18N
        RB_tardeB.setText("Tarde");
        RB_tardeB.setFocusPainted(false);
        RB_tardeB.addItemListener(new java.awt.event.ItemListener() {
            public void itemStateChanged(java.awt.event.ItemEvent evt) {
                RB_tardeBItemStateChanged(evt);
            }
        });
        jPanel9.add(RB_tardeB);
        RB_tardeB.setBounds(450, 190, 90, 34);

        buttonGroup2.add(RB_manhaB);
        RB_manhaB.setFont(new java.awt.Font("Tahoma", 0, 14)); // NOI18N
        RB_manhaB.setText("Manhã");
        RB_manhaB.setFocusPainted(false);
        RB_manhaB.addItemListener(new java.awt.event.ItemListener() {
            public void itemStateChanged(java.awt.event.ItemEvent evt) {
                RB_manhaBItemStateChanged(evt);
            }
        });
        jPanel9.add(RB_manhaB);
        RB_manhaB.setBounds(450, 150, 90, 34);

        serieBB.setEditable(false);
        serieBB.setFont(new java.awt.Font("Tahoma", 0, 14)); // NOI18N
        serieBB.setHorizontalAlignment(javax.swing.JTextField.CENTER);
        serieBB.setText("B");
        serieBB.setBorder(new javax.swing.border.LineBorder(new java.awt.Color(0, 0, 0), 1, true));
        serieBB.setCaretColor(new java.awt.Color(255, 255, 255));
        jPanel9.add(serieBB);
        serieBB.setBounds(380, 170, 40, 40);

        buttonGroup3.add(RB_manhaC);
        RB_manhaC.setFont(new java.awt.Font("Tahoma", 0, 14)); // NOI18N
        RB_manhaC.setText("Manhã");
        RB_manhaC.setFocusPainted(false);
        RB_manhaC.addItemListener(new java.awt.event.ItemListener() {
            public void itemStateChanged(java.awt.event.ItemEvent evt) {
                RB_manhaCItemStateChanged(evt);
            }
        });
        jPanel9.add(RB_manhaC);
        RB_manhaC.setBounds(150, 250, 80, 25);

        buttonGroup3.add(RB_tardeC);
        RB_tardeC.setFont(new java.awt.Font("Tahoma", 0, 14)); // NOI18N
        RB_tardeC.setText("Tarde");
        RB_tardeC.setFocusPainted(false);
        RB_tardeC.addItemListener(new java.awt.event.ItemListener() {
            public void itemStateChanged(java.awt.event.ItemEvent evt) {
                RB_tardeCItemStateChanged(evt);
            }
        });
        jPanel9.add(RB_tardeC);
        RB_tardeC.setBounds(150, 290, 70, 25);

        serieCC.setEditable(false);
        serieCC.setFont(new java.awt.Font("Tahoma", 0, 14)); // NOI18N
        serieCC.setHorizontalAlignment(javax.swing.JTextField.CENTER);
        serieCC.setText("C");
        serieCC.setBorder(new javax.swing.border.LineBorder(new java.awt.Color(0, 0, 0), 1, true));
        serieCC.setCaretColor(new java.awt.Color(255, 255, 255));
        jPanel9.add(serieCC);
        serieCC.setBounds(80, 270, 40, 40);

        jSeparator33.setPreferredSize(new java.awt.Dimension(3, 0));
        jPanel9.add(jSeparator33);
        jSeparator33.setBounds(80, 340, 220, 10);

        jSeparator44.setPreferredSize(new java.awt.Dimension(3, 0));
        jPanel9.add(jSeparator44);
        jSeparator44.setBounds(380, 340, 220, 10);

        buttonGroup4.add(RB_tardeD);
        RB_tardeD.setFont(new java.awt.Font("Tahoma", 0, 14)); // NOI18N
        RB_tardeD.setText("Tarde");
        RB_tardeD.setFocusPainted(false);
        RB_tardeD.addItemListener(new java.awt.event.ItemListener() {
            public void itemStateChanged(java.awt.event.ItemEvent evt) {
                RB_tardeDItemStateChanged(evt);
            }
        });
        jPanel9.add(RB_tardeD);
        RB_tardeD.setBounds(450, 290, 70, 25);

        buttonGroup4.add(RB_manhaD);
        RB_manhaD.setFont(new java.awt.Font("Tahoma", 0, 14)); // NOI18N
        RB_manhaD.setText("Manhã");
        RB_manhaD.setFocusPainted(false);
        RB_manhaD.addItemListener(new java.awt.event.ItemListener() {
            public void itemStateChanged(java.awt.event.ItemEvent evt) {
                RB_manhaDItemStateChanged(evt);
            }
        });
        jPanel9.add(RB_manhaD);
        RB_manhaD.setBounds(450, 250, 80, 25);

        serieDD.setEditable(false);
        serieDD.setFont(new java.awt.Font("Tahoma", 0, 14)); // NOI18N
        serieDD.setHorizontalAlignment(javax.swing.JTextField.CENTER);
        serieDD.setText("D");
        serieDD.setBorder(new javax.swing.border.LineBorder(new java.awt.Color(0, 0, 0), 1, true));
        serieDD.setCaretColor(new java.awt.Color(255, 255, 255));
        jPanel9.add(serieDD);
        serieDD.setBounds(380, 270, 40, 40);

        jButton13.setFont(new java.awt.Font("Tahoma", 0, 14)); // NOI18N
        jButton13.setText("Ok");
        jButton13.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButton13ActionPerformed(evt);
            }
        });
        jPanel9.add(jButton13);
        jButton13.setBounds(300, 550, 70, 40);

        jButton14.setFont(new java.awt.Font("Tahoma", 0, 14)); // NOI18N
        jButton14.setText("Voltar");
        jButton14.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButton14ActionPerformed(evt);
            }
        });
        jPanel9.add(jButton14);
        jButton14.setBounds(20, 580, 130, 40);

        jPanel9.setBounds(0, 0, 640, 650);
        jDesktopPane8.add(jPanel9, javax.swing.JLayeredPane.DEFAULT_LAYER);

        javax.swing.GroupLayout jD_addestagioLayout = new javax.swing.GroupLayout(jD_addestagio.getContentPane());
        jD_addestagio.getContentPane().setLayout(jD_addestagioLayout);
        jD_addestagioLayout.setHorizontalGroup(
            jD_addestagioLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 624, Short.MAX_VALUE)
            .addGroup(jD_addestagioLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                .addGroup(jD_addestagioLayout.createSequentialGroup()
                    .addComponent(jDesktopPane8, javax.swing.GroupLayout.PREFERRED_SIZE, 624, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addGap(0, 0, Short.MAX_VALUE)))
        );
        jD_addestagioLayout.setVerticalGroup(
            jD_addestagioLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 634, Short.MAX_VALUE)
            .addGroup(jD_addestagioLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                .addComponent(jDesktopPane8, javax.swing.GroupLayout.DEFAULT_SIZE, 634, Short.MAX_VALUE))
        );

        jDialog1.setTitle("Pesquisar Professor");
        jDialog1.setResizable(false);

        jPanel11.setBackground(new java.awt.Color(255, 255, 255));
        jPanel11.setLayout(null);

        jl_Pesquisar_prof.setBackground(new java.awt.Color(0, 0, 0));
        jl_Pesquisar_prof.setFont(new java.awt.Font("Tahoma", 0, 18)); // NOI18N
        jl_Pesquisar_prof.setText("Pesquisar");
        jPanel11.add(jl_Pesquisar_prof);
        jl_Pesquisar_prof.setBounds(220, 60, 80, 40);

        JTF_Pesquisar_prof.setFont(new java.awt.Font("Tahoma", 0, 14)); // NOI18N
        JTF_Pesquisar_prof.setHorizontalAlignment(javax.swing.JTextField.CENTER);
        JTF_Pesquisar_prof.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0, 0)));
        JTF_Pesquisar_prof.addKeyListener(new java.awt.event.KeyAdapter() {
            public void keyReleased(java.awt.event.KeyEvent evt) {
                JTF_Pesquisar_profKeyReleased(evt);
            }
        });
        jPanel11.add(JTF_Pesquisar_prof);
        JTF_Pesquisar_prof.setBounds(20, 30, 470, 19);

        jScrollPane2_prof.setBackground(new java.awt.Color(0, 0, 0));
        jScrollPane2_prof.setBorder(javax.swing.BorderFactory.createMatteBorder(2, 2, 2, 2, new java.awt.Color(0, 0, 0)));
        jScrollPane2_prof.setForeground(new java.awt.Color(255, 102, 0));
        jScrollPane2_prof.setCursor(new java.awt.Cursor(java.awt.Cursor.DEFAULT_CURSOR));

        jTTabela_Prof_prof.setBackground(new java.awt.Color(0, 0, 0));
        jTTabela_Prof_prof.setForeground(new java.awt.Color(255, 255, 255));
        jTTabela_Prof_prof.setModel(tmProf_prof);
        jTTabela_Prof_prof.setCursor(new java.awt.Cursor(java.awt.Cursor.HAND_CURSOR));
        jTTabela_Prof_prof.setGridColor(new java.awt.Color(255, 255, 255));
        jTTabela_Prof_prof.setInheritsPopupMenu(true);
        jTTabela_Prof_prof.setSelectionBackground(new java.awt.Color(0, 0, 0));
        jTTabela_Prof_prof.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
        lsmProf_prof = jTTabela_Prof_prof.getSelectionModel();
        lsmProf_prof.addListSelectionListener(new ListSelectionListener(){
            public void valueChanged(ListSelectionEvent e){
                if(! e.getValueIsAdjusting()){
                    JTTabelaLinhaSelecionada_prof(jTTabela_Prof_prof);
                }
            }
        }
    );
    jScrollPane2_prof.setViewportView(jTTabela_Prof_prof);

    jPanel11.add(jScrollPane2_prof);
    jScrollPane2_prof.setBounds(20, 120, 470, 170);

    javax.swing.GroupLayout jDialog1Layout = new javax.swing.GroupLayout(jDialog1.getContentPane());
    jDialog1.getContentPane().setLayout(jDialog1Layout);
    jDialog1Layout.setHorizontalGroup(
        jDialog1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
        .addComponent(jPanel11, javax.swing.GroupLayout.PREFERRED_SIZE, 516, javax.swing.GroupLayout.PREFERRED_SIZE)
    );
    jDialog1Layout.setVerticalGroup(
        jDialog1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
        .addGroup(jDialog1Layout.createSequentialGroup()
            .addComponent(jPanel11, javax.swing.GroupLayout.PREFERRED_SIZE, 329, javax.swing.GroupLayout.PREFERRED_SIZE)
            .addGap(0, 0, Short.MAX_VALUE))
    );

    jDialog2.setResizable(false);

    jPanel12.setBackground(new java.awt.Color(255, 255, 255));
    jPanel12.setLayout(null);

    jl_Pesquisar1_prof.setBackground(new java.awt.Color(0, 0, 0));
    jl_Pesquisar1_prof.setFont(new java.awt.Font("Tahoma", 0, 18)); // NOI18N
    jl_Pesquisar1_prof.setText("Pesquisar");
    jPanel12.add(jl_Pesquisar1_prof);
    jl_Pesquisar1_prof.setBounds(220, 60, 80, 40);

    JTF_Pesquisarmaterias_prof.setFont(new java.awt.Font("Tahoma", 0, 14)); // NOI18N
    JTF_Pesquisarmaterias_prof.setHorizontalAlignment(javax.swing.JTextField.CENTER);
    JTF_Pesquisarmaterias_prof.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0, 0)));
    JTF_Pesquisarmaterias_prof.addKeyListener(new java.awt.event.KeyAdapter() {
        public void keyReleased(java.awt.event.KeyEvent evt) {
            JTF_Pesquisarmaterias_profKeyReleased(evt);
        }
    });
    jPanel12.add(JTF_Pesquisarmaterias_prof);
    JTF_Pesquisarmaterias_prof.setBounds(20, 30, 470, 19);

    jScrollPane3_prof.setBackground(new java.awt.Color(0, 0, 0));
    jScrollPane3_prof.setBorder(javax.swing.BorderFactory.createMatteBorder(2, 2, 2, 2, new java.awt.Color(0, 0, 0)));
    jScrollPane3_prof.setForeground(new java.awt.Color(51, 204, 0));
    jScrollPane3_prof.setCursor(new java.awt.Cursor(java.awt.Cursor.DEFAULT_CURSOR));

    jTTabela_Disc_prof.setBackground(new java.awt.Color(0, 0, 0));
    jTTabela_Disc_prof.setForeground(new java.awt.Color(255, 255, 255));
    jTTabela_Disc_prof.setModel(tmDisc_prof);
    jTTabela_Disc_prof.setCursor(new java.awt.Cursor(java.awt.Cursor.HAND_CURSOR));
    jTTabela_Disc_prof.setGridColor(new java.awt.Color(255, 255, 255));
    jTTabela_Disc_prof.setInheritsPopupMenu(true);
    jTTabela_Disc_prof.setSelectionBackground(new java.awt.Color(0, 0, 0));
    jTTabela_Disc_prof.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
    lsmDisc_prof = jTTabela_Disc_prof.getSelectionModel();
    lsmDisc_prof.addListSelectionListener(new ListSelectionListener(){
        public void valueChanged(ListSelectionEvent e){
            if(! e.getValueIsAdjusting()){
                JTTabelaLinhaSelecionada2_prof(jTTabela_Disc_prof);
            }
        }
    }
    );
    jScrollPane3_prof.setViewportView(jTTabela_Disc_prof);

    jPanel12.add(jScrollPane3_prof);
    jScrollPane3_prof.setBounds(20, 110, 470, 180);

    javax.swing.GroupLayout jDialog2Layout = new javax.swing.GroupLayout(jDialog2.getContentPane());
    jDialog2.getContentPane().setLayout(jDialog2Layout);
    jDialog2Layout.setHorizontalGroup(
        jDialog2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
        .addComponent(jPanel12, javax.swing.GroupLayout.PREFERRED_SIZE, 516, javax.swing.GroupLayout.PREFERRED_SIZE)
    );
    jDialog2Layout.setVerticalGroup(
        jDialog2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
        .addGroup(jDialog2Layout.createSequentialGroup()
            .addComponent(jPanel12, javax.swing.GroupLayout.PREFERRED_SIZE, 324, javax.swing.GroupLayout.PREFERRED_SIZE)
            .addGap(0, 0, Short.MAX_VALUE))
    );

    timer1.addTimerListener(new org.netbeans.examples.lib.timerbean.TimerListener() {
        public void onTime(java.awt.event.ActionEvent evt) {
            timer1OnTime(evt);
        }
    });

    jDialog3.setResizable(false);

    jPanel13.setBackground(new java.awt.Color(255, 255, 255));
    jPanel13.setLayout(null);

    jl_Pesquisar2_prof.setBackground(new java.awt.Color(0, 0, 0));
    jl_Pesquisar2_prof.setFont(new java.awt.Font("Tahoma", 0, 18)); // NOI18N
    jl_Pesquisar2_prof.setText("Pesquisar");
    jPanel13.add(jl_Pesquisar2_prof);
    jl_Pesquisar2_prof.setBounds(230, 60, 80, 40);

    JTF_Pesquisarmaterias1_prof.setFont(new java.awt.Font("Tahoma", 0, 14)); // NOI18N
    JTF_Pesquisarmaterias1_prof.setHorizontalAlignment(javax.swing.JTextField.CENTER);
    JTF_Pesquisarmaterias1_prof.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0, 0)));
    JTF_Pesquisarmaterias1_prof.addKeyListener(new java.awt.event.KeyAdapter() {
        public void keyReleased(java.awt.event.KeyEvent evt) {
            JTF_Pesquisarmaterias1_profKeyReleased(evt);
        }
    });
    jPanel13.add(JTF_Pesquisarmaterias1_prof);
    JTF_Pesquisarmaterias1_prof.setBounds(20, 19, 470, 30);

    jScrollPane5_prof.setBackground(new java.awt.Color(0, 0, 0));
    jScrollPane5_prof.setBorder(javax.swing.BorderFactory.createMatteBorder(2, 2, 2, 2, new java.awt.Color(0, 0, 0)));
    jScrollPane5_prof.setForeground(new java.awt.Color(51, 204, 0));
    jScrollPane5_prof.setCursor(new java.awt.Cursor(java.awt.Cursor.DEFAULT_CURSOR));

    jTTabela_Disc1_prof.setBackground(new java.awt.Color(0, 0, 0));
    jTTabela_Disc1_prof.setForeground(new java.awt.Color(255, 255, 255));
    jTTabela_Disc1_prof.setModel(tmDisc_prof);
    jTTabela_Disc1_prof.setCursor(new java.awt.Cursor(java.awt.Cursor.HAND_CURSOR));
    jTTabela_Disc1_prof.setGridColor(new java.awt.Color(255, 255, 255));
    jTTabela_Disc1_prof.setInheritsPopupMenu(true);
    jTTabela_Disc1_prof.setSelectionBackground(new java.awt.Color(0, 0, 0));
    jTTabela_Disc1_prof.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
    lsmDisc_prof = jTTabela_Disc1_prof.getSelectionModel();
    lsmDisc_prof.addListSelectionListener(new ListSelectionListener(){
        public void valueChanged(ListSelectionEvent e){
            if(! e.getValueIsAdjusting()){
                JTTabelaLinhaSelecionada3_prof(jTTabela_Disc1_prof);
            }
        }
    }
    );
    jScrollPane5_prof.setViewportView(jTTabela_Disc1_prof);

    jPanel13.add(jScrollPane5_prof);
    jScrollPane5_prof.setBounds(20, 110, 470, 180);

    javax.swing.GroupLayout jDialog3Layout = new javax.swing.GroupLayout(jDialog3.getContentPane());
    jDialog3.getContentPane().setLayout(jDialog3Layout);
    jDialog3Layout.setHorizontalGroup(
        jDialog3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
        .addComponent(jPanel13, javax.swing.GroupLayout.PREFERRED_SIZE, 516, javax.swing.GroupLayout.PREFERRED_SIZE)
    );
    jDialog3Layout.setVerticalGroup(
        jDialog3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
        .addGroup(jDialog3Layout.createSequentialGroup()
            .addComponent(jPanel13, javax.swing.GroupLayout.PREFERRED_SIZE, 324, javax.swing.GroupLayout.PREFERRED_SIZE)
            .addGap(0, 0, Short.MAX_VALUE))
    );

    jDialog4.setResizable(false);

    jPanel14.setBackground(new java.awt.Color(255, 255, 255));
    jPanel14.setLayout(null);

    jl_Pesquisar2_prof1.setBackground(new java.awt.Color(0, 0, 0));
    jl_Pesquisar2_prof1.setFont(new java.awt.Font("Tahoma", 0, 18)); // NOI18N
    jl_Pesquisar2_prof1.setText("Pesquisar");
    jPanel14.add(jl_Pesquisar2_prof1);
    jl_Pesquisar2_prof1.setBounds(230, 60, 80, 40);

    JTF_Pesquisarmaterias1_prof1.setFont(new java.awt.Font("Tahoma", 0, 14)); // NOI18N
    JTF_Pesquisarmaterias1_prof1.setHorizontalAlignment(javax.swing.JTextField.CENTER);
    JTF_Pesquisarmaterias1_prof1.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0, 0)));
    JTF_Pesquisarmaterias1_prof1.addKeyListener(new java.awt.event.KeyAdapter() {
        public void keyReleased(java.awt.event.KeyEvent evt) {
            JTF_Pesquisarmaterias1_prof1KeyReleased(evt);
        }
    });
    jPanel14.add(JTF_Pesquisarmaterias1_prof1);
    JTF_Pesquisarmaterias1_prof1.setBounds(20, 19, 470, 30);

    jScrollPane5_prof1.setBackground(new java.awt.Color(0, 0, 0));
    jScrollPane5_prof1.setBorder(javax.swing.BorderFactory.createMatteBorder(2, 2, 2, 2, new java.awt.Color(0, 0, 0)));
    jScrollPane5_prof1.setForeground(new java.awt.Color(51, 204, 0));
    jScrollPane5_prof1.setCursor(new java.awt.Cursor(java.awt.Cursor.DEFAULT_CURSOR));

    jTTabela_Disc_prof_reg.setBackground(new java.awt.Color(0, 0, 0));
    jTTabela_Disc_prof_reg.setForeground(new java.awt.Color(255, 255, 255));
    jTTabela_Disc_prof_reg.setModel(tmDisc_prof_reg);
    jTTabela_Disc_prof_reg.setCursor(new java.awt.Cursor(java.awt.Cursor.HAND_CURSOR));
    jTTabela_Disc_prof_reg.setGridColor(new java.awt.Color(255, 255, 255));
    jTTabela_Disc_prof_reg.setInheritsPopupMenu(true);
    jTTabela_Disc_prof_reg.setSelectionBackground(new java.awt.Color(0, 0, 0));
    jTTabela_Disc_prof_reg.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
    lsmDisc_prof_reg = jTTabela_Disc_prof_reg.getSelectionModel();
    lsmDisc_prof_reg.addListSelectionListener(new ListSelectionListener(){
        public void valueChanged(ListSelectionEvent e){
            if(! e.getValueIsAdjusting()){
                JTTabelaLinhaSelecionada_prof_reg(jTTabela_Disc_prof_reg);
            }
        }
    }
    );
    jScrollPane5_prof1.setViewportView(jTTabela_Disc_prof_reg);

    jPanel14.add(jScrollPane5_prof1);
    jScrollPane5_prof1.setBounds(20, 110, 470, 180);

    javax.swing.GroupLayout jDialog4Layout = new javax.swing.GroupLayout(jDialog4.getContentPane());
    jDialog4.getContentPane().setLayout(jDialog4Layout);
    jDialog4Layout.setHorizontalGroup(
        jDialog4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
        .addComponent(jPanel14, javax.swing.GroupLayout.PREFERRED_SIZE, 516, javax.swing.GroupLayout.PREFERRED_SIZE)
    );
    jDialog4Layout.setVerticalGroup(
        jDialog4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
        .addGroup(jDialog4Layout.createSequentialGroup()
            .addComponent(jPanel14, javax.swing.GroupLayout.PREFERRED_SIZE, 324, javax.swing.GroupLayout.PREFERRED_SIZE)
            .addGap(0, 317, Short.MAX_VALUE))
    );

    setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
    setTitle("SGH (Sistema Gerenciador de Horários)");
    setBackground(new java.awt.Color(102, 102, 102));
    setResizable(false);

    jPanel1.setLayout(null);

    jB_curso.setFont(new java.awt.Font("Arial", 0, 14)); // NOI18N
    jB_curso.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Imagens/curso2.png"))); // NOI18N
    jB_curso.setText("Cursos");
    jB_curso.setHorizontalAlignment(javax.swing.SwingConstants.LEFT);
    jB_curso.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            jB_cursoActionPerformed(evt);
        }
    });
    jPanel1.add(jB_curso);
    jB_curso.setBounds(10, 50, 180, 50);

    jB_serie.setFont(new java.awt.Font("Arial", 0, 14)); // NOI18N
    jB_serie.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Imagens/serie.png"))); // NOI18N
    jB_serie.setText("Series");
    jB_serie.setHorizontalAlignment(javax.swing.SwingConstants.LEFT);
    jB_serie.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            jB_serieActionPerformed(evt);
        }
    });
    jPanel1.add(jB_serie);
    jB_serie.setBounds(10, 190, 180, 50);

    jB_ha.setFont(new java.awt.Font("Arial", 0, 14)); // NOI18N
    jB_ha.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Imagens/ha.png"))); // NOI18N
    jB_ha.setText("Horas Aulas");
    jB_ha.setHorizontalAlignment(javax.swing.SwingConstants.LEFT);
    jB_ha.setMaximumSize(new java.awt.Dimension(145, 53));
    jB_ha.setMinimumSize(new java.awt.Dimension(145, 53));
    jB_ha.setPreferredSize(new java.awt.Dimension(145, 53));
    jB_ha.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            jB_haActionPerformed(evt);
        }
    });
    jPanel1.add(jB_ha);
    jB_ha.setBounds(10, 330, 180, 50);

    jB_layout.setFont(new java.awt.Font("Arial", 0, 14)); // NOI18N
    jB_layout.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Imagens/lay.png"))); // NOI18N
    jB_layout.setText("Layout");
    jB_layout.setHorizontalAlignment(javax.swing.SwingConstants.LEFT);
    jB_layout.setPreferredSize(new java.awt.Dimension(145, 53));
    jB_layout.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            jB_layoutActionPerformed(evt);
        }
    });
    jPanel1.add(jB_layout);
    jB_layout.setBounds(10, 470, 180, 50);

    jB_disciplina.setFont(new java.awt.Font("Arial", 0, 14)); // NOI18N
    jB_disciplina.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Imagens/disc.png"))); // NOI18N
    jB_disciplina.setText("Disciplinas");
    jB_disciplina.setHorizontalAlignment(javax.swing.SwingConstants.LEFT);
    jB_disciplina.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            jB_disciplinaActionPerformed(evt);
        }
    });
    jPanel1.add(jB_disciplina);
    jB_disciplina.setBounds(10, 120, 180, 50);

    jB_prof.setFont(new java.awt.Font("Arial", 0, 14)); // NOI18N
    jB_prof.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Imagens/prof.png"))); // NOI18N
    jB_prof.setText("Professores");
    jB_prof.setHorizontalAlignment(javax.swing.SwingConstants.LEFT);
    jB_prof.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            jB_profActionPerformed(evt);
        }
    });
    jPanel1.add(jB_prof);
    jB_prof.setBounds(10, 260, 180, 50);

    jB_relatorio.setFont(new java.awt.Font("Arial", 0, 14)); // NOI18N
    jB_relatorio.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Imagens/rel.png"))); // NOI18N
    jB_relatorio.setText("Relatórios");
    jB_relatorio.setHorizontalAlignment(javax.swing.SwingConstants.LEFT);
    jB_relatorio.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            jB_relatorioActionPerformed(evt);
        }
    });
    jPanel1.add(jB_relatorio);
    jB_relatorio.setBounds(10, 400, 180, 50);

    jLabel1_sgh.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Imagens/iconebarra.png"))); // NOI18N
    jLabel1_sgh.setCursor(new java.awt.Cursor(java.awt.Cursor.HAND_CURSOR));
    jLabel1_sgh.addMouseListener(new java.awt.event.MouseAdapter() {
        public void mouseClicked(java.awt.event.MouseEvent evt) {
            jLabel1_sghMouseClicked(evt);
        }
    });
    jPanel1.add(jLabel1_sgh);
    jLabel1_sgh.setBounds(20, 550, 150, 60);

    jPanel_prof.setBackground(new java.awt.Color(255, 255, 255));
    jPanel_prof.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0, 0), 2));
    jPanel_prof.setLayout(null);

    jDesktopPane1_prof.setBackground(new java.awt.Color(255, 255, 255));

    jPanel1_prof.setBackground(new java.awt.Color(255, 255, 255));
    jPanel1_prof.setLayout(null);

    jSeparator1_prof.setOrientation(javax.swing.SwingConstants.VERTICAL);
    jPanel1_prof.add(jSeparator1_prof);
    jSeparator1_prof.setBounds(90, 30, 11, 550);

    disc5_prof.setEditable(false);
    disc5_prof.setFont(new java.awt.Font("Tahoma", 0, 14)); // NOI18N
    disc5_prof.setHorizontalAlignment(javax.swing.JTextField.CENTER);
    disc5_prof.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0, 0)));
    disc5_prof.setCursor(new java.awt.Cursor(java.awt.Cursor.HAND_CURSOR));
    disc5_prof.addMouseListener(new java.awt.event.MouseAdapter() {
        public void mouseClicked(java.awt.event.MouseEvent evt) {
            disc5_profMouseClicked(evt);
        }
    });
    jPanel1_prof.add(disc5_prof);
    disc5_prof.setBounds(580, 210, 350, 19);

    JLDisc5_prof.setFont(new java.awt.Font("MV Boli", 1, 18)); // NOI18N
    JLDisc5_prof.setText("X");
    JLDisc5_prof.setCursor(new java.awt.Cursor(java.awt.Cursor.HAND_CURSOR));
    JLDisc5_prof.addMouseListener(new java.awt.event.MouseAdapter() {
        public void mouseClicked(java.awt.event.MouseEvent evt) {
            JLDisc5_profMouseClicked(evt);
        }
    });
    jPanel1_prof.add(JLDisc5_prof);
    JLDisc5_prof.setBounds(550, 210, 20, 20);

    jRB_edt_del_prof.setBackground(new java.awt.Color(255, 255, 255));
    buttonGroup1.add(jRB_edt_del_prof);
    jRB_edt_del_prof.setFont(new java.awt.Font("Tahoma", 0, 14)); // NOI18N
    jRB_edt_del_prof.setText("<HTML>Editar<br><br>Deletar");
    jRB_edt_del_prof.setFocusPainted(false);
    jRB_edt_del_prof.addItemListener(new java.awt.event.ItemListener() {
        public void itemStateChanged(java.awt.event.ItemEvent evt) {
            jRB_edt_del_profItemStateChanged(evt);
        }
    });
    jPanel1_prof.add(jRB_edt_del_prof);
    jRB_edt_del_prof.setBounds(0, 330, 80, 90);

    jRB_adicionar_prof.setBackground(new java.awt.Color(255, 255, 255));
    buttonGroup1.add(jRB_adicionar_prof);
    jRB_adicionar_prof.setFont(new java.awt.Font("Tahoma", 0, 14)); // NOI18N
    jRB_adicionar_prof.setText("Adicionar");
    jRB_adicionar_prof.setFocusPainted(false);
    jRB_adicionar_prof.addItemListener(new java.awt.event.ItemListener() {
        public void itemStateChanged(java.awt.event.ItemEvent evt) {
            jRB_adicionar_profItemStateChanged(evt);
        }
    });
    jPanel1_prof.add(jRB_adicionar_prof);
    jRB_adicionar_prof.setBounds(0, 190, 80, 25);

    jl_nome_prof.setBackground(new java.awt.Color(0, 0, 0));
    jl_nome_prof.setFont(new java.awt.Font("Tahoma", 0, 14)); // NOI18N
    jl_nome_prof.setText("Professor: ");
    jPanel1_prof.add(jl_nome_prof);
    jl_nome_prof.setBounds(140, 20, 70, 30);

    jl_turma_prof.setBackground(new java.awt.Color(0, 0, 0));
    jl_turma_prof.setFont(new java.awt.Font("Tahoma", 0, 14)); // NOI18N
    jl_turma_prof.setText("Turma");
    jPanel1_prof.add(jl_turma_prof);
    jl_turma_prof.setBounds(100, 190, 50, 30);

    jTF_Carga_horaria_prof.setFont(new java.awt.Font("Tahoma", 0, 14)); // NOI18N
    jTF_Carga_horaria_prof.setHorizontalAlignment(javax.swing.JTextField.CENTER);
    jTF_Carga_horaria_prof.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0, 0)));
    jPanel1_prof.add(jTF_Carga_horaria_prof);
    jTF_Carga_horaria_prof.setBounds(260, 70, 50, 25);

    jl_carga_horaria_prof.setBackground(new java.awt.Color(0, 0, 0));
    jl_carga_horaria_prof.setFont(new java.awt.Font("Tahoma", 0, 14)); // NOI18N
    jl_carga_horaria_prof.setText("Carga Horaria: ");
    jPanel1_prof.add(jl_carga_horaria_prof);
    jl_carga_horaria_prof.setBounds(120, 70, 120, 30);

    disc2_prof.setEditable(false);
    disc2_prof.setFont(new java.awt.Font("Tahoma", 0, 14)); // NOI18N
    disc2_prof.setHorizontalAlignment(javax.swing.JTextField.CENTER);
    disc2_prof.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0, 0)));
    disc2_prof.setCursor(new java.awt.Cursor(java.awt.Cursor.HAND_CURSOR));
    disc2_prof.addMouseListener(new java.awt.event.MouseAdapter() {
        public void mouseClicked(java.awt.event.MouseEvent evt) {
            disc2_profMouseClicked(evt);
        }
    });
    jPanel1_prof.add(disc2_prof);
    disc2_prof.setBounds(580, 90, 350, 19);

    jTF_nome_prof.setFont(new java.awt.Font("Tahoma", 0, 14)); // NOI18N
    jTF_nome_prof.setHorizontalAlignment(javax.swing.JTextField.CENTER);
    jTF_nome_prof.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0, 0)));
    jPanel1_prof.add(jTF_nome_prof);
    jTF_nome_prof.setBounds(210, 20, 160, 25);

    jRB_regular_prof.setBackground(new java.awt.Color(255, 255, 255));
    jRB_regular_prof.setFont(new java.awt.Font("Tahoma", 0, 14)); // NOI18N
    jRB_regular_prof.setText("Regular");
    jRB_regular_prof.setFocusPainted(false);
    jRB_regular_prof.addItemListener(new java.awt.event.ItemListener() {
        public void itemStateChanged(java.awt.event.ItemEvent evt) {
            jRB_regular_profItemStateChanged(evt);
        }
    });
    jPanel1_prof.add(jRB_regular_prof);
    jRB_regular_prof.setBounds(450, 80, 80, 25);

    jRB_profissional_prof.setBackground(new java.awt.Color(255, 255, 255));
    jRB_profissional_prof.setFont(new java.awt.Font("Tahoma", 0, 14)); // NOI18N
    jRB_profissional_prof.setText("Profissional");
    jRB_profissional_prof.setFocusPainted(false);
    jRB_profissional_prof.addItemListener(new java.awt.event.ItemListener() {
        public void itemStateChanged(java.awt.event.ItemEvent evt) {
            jRB_profissional_profItemStateChanged(evt);
        }
    });
    jPanel1_prof.add(jRB_profissional_prof);
    jRB_profissional_prof.setBounds(420, 130, 110, 25);

    jl_eixo_prof.setBackground(new java.awt.Color(0, 0, 0));
    jl_eixo_prof.setFont(new java.awt.Font("Tahoma", 0, 14)); // NOI18N
    jl_eixo_prof.setText("Eixo:");
    jPanel1_prof.add(jl_eixo_prof);
    jl_eixo_prof.setBounds(420, 30, 50, 30);

    disc3_prof.setEditable(false);
    disc3_prof.setFont(new java.awt.Font("Tahoma", 0, 14)); // NOI18N
    disc3_prof.setHorizontalAlignment(javax.swing.JTextField.CENTER);
    disc3_prof.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0, 0)));
    disc3_prof.setCursor(new java.awt.Cursor(java.awt.Cursor.HAND_CURSOR));
    disc3_prof.addMouseListener(new java.awt.event.MouseAdapter() {
        public void mouseClicked(java.awt.event.MouseEvent evt) {
            disc3_profMouseClicked(evt);
        }
    });
    jPanel1_prof.add(disc3_prof);
    disc3_prof.setBounds(580, 130, 350, 19);

    disc4_prof.setEditable(false);
    disc4_prof.setFont(new java.awt.Font("Tahoma", 0, 14)); // NOI18N
    disc4_prof.setHorizontalAlignment(javax.swing.JTextField.CENTER);
    disc4_prof.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0, 0)));
    disc4_prof.setCursor(new java.awt.Cursor(java.awt.Cursor.HAND_CURSOR));
    disc4_prof.addMouseListener(new java.awt.event.MouseAdapter() {
        public void mouseClicked(java.awt.event.MouseEvent evt) {
            disc4_profMouseClicked(evt);
        }
    });
    jPanel1_prof.add(disc4_prof);
    disc4_prof.setBounds(580, 170, 350, 19);

    disc1_prof.setEditable(false);
    disc1_prof.setFont(new java.awt.Font("Tahoma", 0, 14)); // NOI18N
    disc1_prof.setHorizontalAlignment(javax.swing.JTextField.CENTER);
    disc1_prof.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0, 0)));
    disc1_prof.setCursor(new java.awt.Cursor(java.awt.Cursor.HAND_CURSOR));
    disc1_prof.addMouseListener(new java.awt.event.MouseAdapter() {
        public void mouseClicked(java.awt.event.MouseEvent evt) {
            disc1_profMouseClicked(evt);
        }
    });
    jPanel1_prof.add(disc1_prof);
    disc1_prof.setBounds(580, 50, 350, 19);

    jScrollPane1_prof.setRequestFocusEnabled(false);

    jTable2.setBackground(new java.awt.Color(0, 0, 0));
    jTable2.setBorder(javax.swing.BorderFactory.createMatteBorder(2, 2, 2, 2, new java.awt.Color(0, 0, 0)));
    jTable2.setFont(new java.awt.Font("Bell MT", 2, 12)); // NOI18N
    jTable2.setForeground(new java.awt.Color(255, 255, 255));
    jTable2.setModel(new javax.swing.table.DefaultTableModel(
        new Object [][] {
            {null, null, null, null, null},
            {null, null, null, null, null},
            {null, null, null, null, null},
            {null, null, null, null, null},
            {null, null, null, null, null},
            {null, null, null, null, null},
            {null, null, null, null, null},
            {null, null, null, null, null},
            {null, null, null, null, null}
        },
        new String [] {
            "     Segunda", "      Terça", "     Quarta", "     Quinta", "     Sexta"
        }
    ) {
        boolean[] canEdit = new boolean [] {
            false, false, false, false, false
        };

        public boolean isCellEditable(int rowIndex, int columnIndex) {
            return canEdit [columnIndex];
        }
    });
    jTable2.setCursor(new java.awt.Cursor(java.awt.Cursor.HAND_CURSOR));
    jTable2.setFocusable(false);
    jTable2.setGridColor(new java.awt.Color(0, 204, 0));
    jTable2.setRowSelectionAllowed(false);
    jTable2.setSelectionBackground(new java.awt.Color(0, 0, 0));
    jTable2.setSelectionMode(javax.swing.ListSelectionModel.SINGLE_SELECTION);
    jTable2.getTableHeader().setReorderingAllowed(false);
    jTable2.addMouseListener(new java.awt.event.MouseAdapter() {
        public void mouseClicked(java.awt.event.MouseEvent evt) {
            jTable2MouseClicked(evt);
        }
    });
    jScrollPane1_prof.setViewportView(jTable2);

    jPanel1_prof.add(jScrollPane1_prof);
    jScrollPane1_prof.setBounds(490, 300, 440, 180);

    jl_disciplina_prof.setBackground(new java.awt.Color(0, 0, 0));
    jl_disciplina_prof.setFont(new java.awt.Font("Tahoma", 0, 14)); // NOI18N
    jl_disciplina_prof.setText("Disciplinas:");
    jPanel1_prof.add(jl_disciplina_prof);
    jl_disciplina_prof.setBounds(560, 10, 80, 30);

    jl_aulas_prof.setBackground(new java.awt.Color(0, 0, 0));
    jl_aulas_prof.setFont(new java.awt.Font("Tahoma", 0, 14)); // NOI18N
    jl_aulas_prof.setText("Aulas Disponiveis:");
    jPanel1_prof.add(jl_aulas_prof);
    jl_aulas_prof.setBounds(620, 260, 120, 30);

    serie2_prof.setEditable(false);
    serie2_prof.setBackground(new java.awt.Color(255, 255, 255));
    serie2_prof.setFont(new java.awt.Font("Tahoma", 0, 14)); // NOI18N
    serie2_prof.setHorizontalAlignment(javax.swing.JTextField.CENTER);
    serie2_prof.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0, 0)));
    serie2_prof.setCaretColor(new java.awt.Color(255, 255, 255));
    jPanel1_prof.add(serie2_prof);
    serie2_prof.setBounds(260, 150, 30, 20);

    serie3_prof.setEditable(false);
    serie3_prof.setBackground(new java.awt.Color(255, 255, 255));
    serie3_prof.setFont(new java.awt.Font("Tahoma", 0, 14)); // NOI18N
    serie3_prof.setHorizontalAlignment(javax.swing.JTextField.CENTER);
    serie3_prof.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0, 0)));
    serie3_prof.setCaretColor(new java.awt.Color(255, 255, 255));
    jPanel1_prof.add(serie3_prof);
    serie3_prof.setBounds(340, 150, 30, 20);

    serie1_prof.setEditable(false);
    serie1_prof.setBackground(new java.awt.Color(255, 255, 255));
    serie1_prof.setFont(new java.awt.Font("Tahoma", 0, 14)); // NOI18N
    serie1_prof.setHorizontalAlignment(javax.swing.JTextField.CENTER);
    serie1_prof.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0, 0)));
    serie1_prof.setCaretColor(new java.awt.Color(255, 255, 255));
    jPanel1_prof.add(serie1_prof);
    serie1_prof.setBounds(180, 150, 30, 20);

    serieC1.setEditable(false);
    serieC1.setBackground(new java.awt.Color(255, 255, 255));
    serieC1.setFont(new java.awt.Font("Tahoma", 0, 14)); // NOI18N
    serieC1.setHorizontalAlignment(javax.swing.JTextField.CENTER);
    serieC1.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0, 0)));
    serieC1.setCaretColor(new java.awt.Color(255, 255, 255));
    jPanel1_prof.add(serieC1);
    serieC1.setBounds(180, 280, 30, 20);

    serieC2.setEditable(false);
    serieC2.setBackground(new java.awt.Color(255, 255, 255));
    serieC2.setFont(new java.awt.Font("Tahoma", 0, 14)); // NOI18N
    serieC2.setHorizontalAlignment(javax.swing.JTextField.CENTER);
    serieC2.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0, 0)));
    serieC2.setCaretColor(new java.awt.Color(255, 255, 255));
    jPanel1_prof.add(serieC2);
    serieC2.setBounds(260, 280, 30, 20);

    serieC3.setEditable(false);
    serieC3.setBackground(new java.awt.Color(255, 255, 255));
    serieC3.setFont(new java.awt.Font("Tahoma", 0, 14)); // NOI18N
    serieC3.setHorizontalAlignment(javax.swing.JTextField.CENTER);
    serieC3.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0, 0)));
    serieC3.setCaretColor(new java.awt.Color(255, 255, 255));
    jPanel1_prof.add(serieC3);
    serieC3.setBounds(340, 280, 30, 20);

    jl_serie_prof.setBackground(new java.awt.Color(0, 0, 0));
    jl_serie_prof.setFont(new java.awt.Font("Tahoma", 0, 14)); // NOI18N
    jl_serie_prof.setText("Serie");
    jPanel1_prof.add(jl_serie_prof);
    jl_serie_prof.setBounds(110, 140, 40, 30);

    serieD1.setEditable(false);
    serieD1.setBackground(new java.awt.Color(255, 255, 255));
    serieD1.setFont(new java.awt.Font("Tahoma", 0, 14)); // NOI18N
    serieD1.setHorizontalAlignment(javax.swing.JTextField.CENTER);
    serieD1.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0, 0)));
    serieD1.setCaretColor(new java.awt.Color(255, 255, 255));
    jPanel1_prof.add(serieD1);
    serieD1.setBounds(180, 320, 30, 20);

    serieD2.setEditable(false);
    serieD2.setBackground(new java.awt.Color(255, 255, 255));
    serieD2.setFont(new java.awt.Font("Tahoma", 0, 14)); // NOI18N
    serieD2.setHorizontalAlignment(javax.swing.JTextField.CENTER);
    serieD2.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0, 0)));
    serieD2.setCaretColor(new java.awt.Color(255, 255, 255));
    jPanel1_prof.add(serieD2);
    serieD2.setBounds(260, 320, 30, 20);

    serieD3.setEditable(false);
    serieD3.setBackground(new java.awt.Color(255, 255, 255));
    serieD3.setFont(new java.awt.Font("Tahoma", 0, 14)); // NOI18N
    serieD3.setHorizontalAlignment(javax.swing.JTextField.CENTER);
    serieD3.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0, 0)));
    serieD3.setCaretColor(new java.awt.Color(255, 255, 255));
    jPanel1_prof.add(serieD3);
    serieD3.setBounds(340, 320, 30, 20);

    serieE1.setEditable(false);
    serieE1.setBackground(new java.awt.Color(255, 255, 255));
    serieE1.setFont(new java.awt.Font("Tahoma", 0, 14)); // NOI18N
    serieE1.setHorizontalAlignment(javax.swing.JTextField.CENTER);
    serieE1.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0, 0)));
    serieE1.setCaretColor(new java.awt.Color(255, 255, 255));
    jPanel1_prof.add(serieE1);
    serieE1.setBounds(180, 360, 30, 20);

    serieE2.setEditable(false);
    serieE2.setBackground(new java.awt.Color(255, 255, 255));
    serieE2.setFont(new java.awt.Font("Tahoma", 0, 14)); // NOI18N
    serieE2.setHorizontalAlignment(javax.swing.JTextField.CENTER);
    serieE2.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0, 0)));
    serieE2.setCaretColor(new java.awt.Color(255, 255, 255));
    jPanel1_prof.add(serieE2);
    serieE2.setBounds(260, 360, 30, 20);

    serieE3.setEditable(false);
    serieE3.setBackground(new java.awt.Color(255, 255, 255));
    serieE3.setFont(new java.awt.Font("Tahoma", 0, 14)); // NOI18N
    serieE3.setHorizontalAlignment(javax.swing.JTextField.CENTER);
    serieE3.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0, 0)));
    serieE3.setCaretColor(new java.awt.Color(255, 255, 255));
    jPanel1_prof.add(serieE3);
    serieE3.setBounds(340, 360, 30, 20);

    serieF1.setEditable(false);
    serieF1.setBackground(new java.awt.Color(255, 255, 255));
    serieF1.setFont(new java.awt.Font("Tahoma", 0, 14)); // NOI18N
    serieF1.setHorizontalAlignment(javax.swing.JTextField.CENTER);
    serieF1.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0, 0)));
    serieF1.setCaretColor(new java.awt.Color(255, 255, 255));
    jPanel1_prof.add(serieF1);
    serieF1.setBounds(180, 400, 30, 20);

    serieF2.setEditable(false);
    serieF2.setBackground(new java.awt.Color(255, 255, 255));
    serieF2.setFont(new java.awt.Font("Tahoma", 0, 14)); // NOI18N
    serieF2.setHorizontalAlignment(javax.swing.JTextField.CENTER);
    serieF2.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0, 0)));
    serieF2.setCaretColor(new java.awt.Color(255, 255, 255));
    jPanel1_prof.add(serieF2);
    serieF2.setBounds(260, 400, 30, 20);

    serieF3.setEditable(false);
    serieF3.setBackground(new java.awt.Color(255, 255, 255));
    serieF3.setFont(new java.awt.Font("Tahoma", 0, 14)); // NOI18N
    serieF3.setHorizontalAlignment(javax.swing.JTextField.CENTER);
    serieF3.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0, 0)));
    serieF3.setCaretColor(new java.awt.Color(255, 255, 255));
    jPanel1_prof.add(serieF3);
    serieF3.setBounds(340, 400, 30, 20);

    serieG1.setEditable(false);
    serieG1.setBackground(new java.awt.Color(255, 255, 255));
    serieG1.setFont(new java.awt.Font("Tahoma", 0, 14)); // NOI18N
    serieG1.setHorizontalAlignment(javax.swing.JTextField.CENTER);
    serieG1.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0, 0)));
    serieG1.setCaretColor(new java.awt.Color(255, 255, 255));
    jPanel1_prof.add(serieG1);
    serieG1.setBounds(180, 440, 30, 20);

    serieG2.setEditable(false);
    serieG2.setBackground(new java.awt.Color(255, 255, 255));
    serieG2.setFont(new java.awt.Font("Tahoma", 0, 14)); // NOI18N
    serieG2.setHorizontalAlignment(javax.swing.JTextField.CENTER);
    serieG2.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0, 0)));
    serieG2.setCaretColor(new java.awt.Color(255, 255, 255));
    jPanel1_prof.add(serieG2);
    serieG2.setBounds(260, 440, 30, 20);

    serieG3.setEditable(false);
    serieG3.setBackground(new java.awt.Color(255, 255, 255));
    serieG3.setFont(new java.awt.Font("Tahoma", 0, 14)); // NOI18N
    serieG3.setHorizontalAlignment(javax.swing.JTextField.CENTER);
    serieG3.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0, 0)));
    serieG3.setCaretColor(new java.awt.Color(255, 255, 255));
    jPanel1_prof.add(serieG3);
    serieG3.setBounds(340, 440, 30, 20);

    serieH1.setEditable(false);
    serieH1.setBackground(new java.awt.Color(255, 255, 255));
    serieH1.setFont(new java.awt.Font("Tahoma", 0, 14)); // NOI18N
    serieH1.setHorizontalAlignment(javax.swing.JTextField.CENTER);
    serieH1.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0, 0)));
    serieH1.setCaretColor(new java.awt.Color(255, 255, 255));
    jPanel1_prof.add(serieH1);
    serieH1.setBounds(180, 480, 30, 20);

    serieH2.setEditable(false);
    serieH2.setBackground(new java.awt.Color(255, 255, 255));
    serieH2.setFont(new java.awt.Font("Tahoma", 0, 14)); // NOI18N
    serieH2.setHorizontalAlignment(javax.swing.JTextField.CENTER);
    serieH2.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0, 0)));
    serieH2.setCaretColor(new java.awt.Color(255, 255, 255));
    jPanel1_prof.add(serieH2);
    serieH2.setBounds(260, 480, 30, 20);

    serieH3.setEditable(false);
    serieH3.setBackground(new java.awt.Color(255, 255, 255));
    serieH3.setFont(new java.awt.Font("Tahoma", 0, 14)); // NOI18N
    serieH3.setHorizontalAlignment(javax.swing.JTextField.CENTER);
    serieH3.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0, 0)));
    serieH3.setCaretColor(new java.awt.Color(255, 255, 255));
    jPanel1_prof.add(serieH3);
    serieH3.setBounds(340, 480, 30, 20);

    serieA1.setEditable(false);
    serieA1.setBackground(new java.awt.Color(255, 255, 255));
    serieA1.setFont(new java.awt.Font("Tahoma", 0, 14)); // NOI18N
    serieA1.setHorizontalAlignment(javax.swing.JTextField.CENTER);
    serieA1.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0, 0)));
    serieA1.setCaretColor(new java.awt.Color(255, 255, 255));
    jPanel1_prof.add(serieA1);
    serieA1.setBounds(180, 200, 30, 20);

    serieA2.setEditable(false);
    serieA2.setBackground(new java.awt.Color(255, 255, 255));
    serieA2.setFont(new java.awt.Font("Tahoma", 0, 14)); // NOI18N
    serieA2.setHorizontalAlignment(javax.swing.JTextField.CENTER);
    serieA2.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0, 0)));
    serieA2.setCaretColor(new java.awt.Color(255, 255, 255));
    jPanel1_prof.add(serieA2);
    serieA2.setBounds(260, 200, 30, 20);

    serieA3.setEditable(false);
    serieA3.setBackground(new java.awt.Color(255, 255, 255));
    serieA3.setFont(new java.awt.Font("Tahoma", 0, 14)); // NOI18N
    serieA3.setHorizontalAlignment(javax.swing.JTextField.CENTER);
    serieA3.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0, 0)));
    serieA3.setCaretColor(new java.awt.Color(255, 255, 255));
    jPanel1_prof.add(serieA3);
    serieA3.setBounds(340, 200, 30, 20);

    serieB1.setEditable(false);
    serieB1.setBackground(new java.awt.Color(255, 255, 255));
    serieB1.setFont(new java.awt.Font("Tahoma", 0, 14)); // NOI18N
    serieB1.setHorizontalAlignment(javax.swing.JTextField.CENTER);
    serieB1.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0, 0)));
    serieB1.setCaretColor(new java.awt.Color(255, 255, 255));
    jPanel1_prof.add(serieB1);
    serieB1.setBounds(180, 240, 30, 20);

    serieB2.setEditable(false);
    serieB2.setBackground(new java.awt.Color(255, 255, 255));
    serieB2.setFont(new java.awt.Font("Tahoma", 0, 14)); // NOI18N
    serieB2.setHorizontalAlignment(javax.swing.JTextField.CENTER);
    serieB2.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0, 0)));
    serieB2.setCaretColor(new java.awt.Color(255, 255, 255));
    jPanel1_prof.add(serieB2);
    serieB2.setBounds(260, 240, 30, 20);

    serieB3.setEditable(false);
    serieB3.setBackground(new java.awt.Color(255, 255, 255));
    serieB3.setFont(new java.awt.Font("Tahoma", 0, 14)); // NOI18N
    serieB3.setHorizontalAlignment(javax.swing.JTextField.CENTER);
    serieB3.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0, 0)));
    serieB3.setCaretColor(new java.awt.Color(255, 255, 255));
    jPanel1_prof.add(serieB3);
    serieB3.setBounds(340, 240, 30, 20);

    marcar.setFont(new java.awt.Font("Tahoma", 0, 14)); // NOI18N
    marcar.setText("Marcar tudo");
    marcar.setCursor(new java.awt.Cursor(java.awt.Cursor.HAND_CURSOR));
    marcar.addMouseListener(new java.awt.event.MouseAdapter() {
        public void mouseClicked(java.awt.event.MouseEvent evt) {
            marcarMouseClicked(evt);
        }
    });
    jPanel1_prof.add(marcar);
    marcar.setBounds(490, 490, 80, 17);

    desmarcar.setFont(new java.awt.Font("Tahoma", 0, 14)); // NOI18N
    desmarcar.setText("Desmarcar tudo");
    desmarcar.setCursor(new java.awt.Cursor(java.awt.Cursor.HAND_CURSOR));
    desmarcar.addMouseListener(new java.awt.event.MouseAdapter() {
        public void mouseClicked(java.awt.event.MouseEvent evt) {
            desmarcarMouseClicked(evt);
        }
    });
    jPanel1_prof.add(desmarcar);
    desmarcar.setBounds(760, 490, 110, 17);

    JLA1.setFont(new java.awt.Font("MV Boli", 1, 18)); // NOI18N
    JLA1.setText("X");
    JLA1.setCursor(new java.awt.Cursor(java.awt.Cursor.HAND_CURSOR));
    JLA1.addMouseListener(new java.awt.event.MouseAdapter() {
        public void mouseClicked(java.awt.event.MouseEvent evt) {
            JLA1MouseClicked(evt);
        }
    });
    jPanel1_prof.add(JLA1);
    JLA1.setBounds(160, 200, 20, 20);

    JLA3.setFont(new java.awt.Font("MV Boli", 1, 18)); // NOI18N
    JLA3.setText("X");
    JLA3.setCursor(new java.awt.Cursor(java.awt.Cursor.HAND_CURSOR));
    JLA3.addMouseListener(new java.awt.event.MouseAdapter() {
        public void mouseClicked(java.awt.event.MouseEvent evt) {
            JLA3MouseClicked(evt);
        }
    });
    jPanel1_prof.add(JLA3);
    JLA3.setBounds(320, 200, 20, 20);

    JLB1.setFont(new java.awt.Font("MV Boli", 1, 18)); // NOI18N
    JLB1.setText("X");
    JLB1.setCursor(new java.awt.Cursor(java.awt.Cursor.HAND_CURSOR));
    JLB1.addMouseListener(new java.awt.event.MouseAdapter() {
        public void mouseClicked(java.awt.event.MouseEvent evt) {
            JLB1MouseClicked(evt);
        }
    });
    jPanel1_prof.add(JLB1);
    JLB1.setBounds(160, 240, 20, 20);

    JLB2.setFont(new java.awt.Font("MV Boli", 1, 18)); // NOI18N
    JLB2.setText("X");
    JLB2.setCursor(new java.awt.Cursor(java.awt.Cursor.HAND_CURSOR));
    JLB2.addMouseListener(new java.awt.event.MouseAdapter() {
        public void mouseClicked(java.awt.event.MouseEvent evt) {
            JLB2MouseClicked(evt);
        }
    });
    jPanel1_prof.add(JLB2);
    JLB2.setBounds(240, 240, 20, 20);

    JLB3.setFont(new java.awt.Font("MV Boli", 1, 18)); // NOI18N
    JLB3.setText("X");
    JLB3.setCursor(new java.awt.Cursor(java.awt.Cursor.HAND_CURSOR));
    JLB3.addMouseListener(new java.awt.event.MouseAdapter() {
        public void mouseClicked(java.awt.event.MouseEvent evt) {
            JLB3MouseClicked(evt);
        }
    });
    jPanel1_prof.add(JLB3);
    JLB3.setBounds(320, 240, 20, 20);

    JLC2.setFont(new java.awt.Font("MV Boli", 1, 18)); // NOI18N
    JLC2.setText("X");
    JLC2.setCursor(new java.awt.Cursor(java.awt.Cursor.HAND_CURSOR));
    JLC2.addMouseListener(new java.awt.event.MouseAdapter() {
        public void mouseClicked(java.awt.event.MouseEvent evt) {
            JLC2MouseClicked(evt);
        }
    });
    jPanel1_prof.add(JLC2);
    JLC2.setBounds(240, 280, 20, 20);

    JLC3.setFont(new java.awt.Font("MV Boli", 1, 18)); // NOI18N
    JLC3.setText("X");
    JLC3.setCursor(new java.awt.Cursor(java.awt.Cursor.HAND_CURSOR));
    JLC3.addMouseListener(new java.awt.event.MouseAdapter() {
        public void mouseClicked(java.awt.event.MouseEvent evt) {
            JLC3MouseClicked(evt);
        }
    });
    jPanel1_prof.add(JLC3);
    JLC3.setBounds(320, 280, 20, 20);

    JLC1.setFont(new java.awt.Font("MV Boli", 1, 18)); // NOI18N
    JLC1.setText("X");
    JLC1.setCursor(new java.awt.Cursor(java.awt.Cursor.HAND_CURSOR));
    JLC1.addMouseListener(new java.awt.event.MouseAdapter() {
        public void mouseClicked(java.awt.event.MouseEvent evt) {
            JLC1MouseClicked(evt);
        }
    });
    jPanel1_prof.add(JLC1);
    JLC1.setBounds(160, 280, 20, 20);

    JLD3.setFont(new java.awt.Font("MV Boli", 1, 18)); // NOI18N
    JLD3.setText("X");
    JLD3.setCursor(new java.awt.Cursor(java.awt.Cursor.HAND_CURSOR));
    JLD3.addMouseListener(new java.awt.event.MouseAdapter() {
        public void mouseClicked(java.awt.event.MouseEvent evt) {
            JLD3MouseClicked(evt);
        }
    });
    jPanel1_prof.add(JLD3);
    JLD3.setBounds(320, 320, 20, 20);

    JLD2.setFont(new java.awt.Font("MV Boli", 1, 18)); // NOI18N
    JLD2.setText("X");
    JLD2.setCursor(new java.awt.Cursor(java.awt.Cursor.HAND_CURSOR));
    JLD2.addMouseListener(new java.awt.event.MouseAdapter() {
        public void mouseClicked(java.awt.event.MouseEvent evt) {
            JLD2MouseClicked(evt);
        }
    });
    jPanel1_prof.add(JLD2);
    JLD2.setBounds(240, 320, 20, 20);

    JLD1.setFont(new java.awt.Font("MV Boli", 1, 18)); // NOI18N
    JLD1.setText("X");
    JLD1.setCursor(new java.awt.Cursor(java.awt.Cursor.HAND_CURSOR));
    JLD1.addMouseListener(new java.awt.event.MouseAdapter() {
        public void mouseClicked(java.awt.event.MouseEvent evt) {
            JLD1MouseClicked(evt);
        }
    });
    jPanel1_prof.add(JLD1);
    JLD1.setBounds(160, 320, 20, 20);

    JLE3.setFont(new java.awt.Font("MV Boli", 1, 18)); // NOI18N
    JLE3.setText("X");
    JLE3.setCursor(new java.awt.Cursor(java.awt.Cursor.HAND_CURSOR));
    JLE3.addMouseListener(new java.awt.event.MouseAdapter() {
        public void mouseClicked(java.awt.event.MouseEvent evt) {
            JLE3MouseClicked(evt);
        }
    });
    jPanel1_prof.add(JLE3);
    JLE3.setBounds(320, 360, 20, 20);

    JLE2.setFont(new java.awt.Font("MV Boli", 1, 18)); // NOI18N
    JLE2.setText("X");
    JLE2.setCursor(new java.awt.Cursor(java.awt.Cursor.HAND_CURSOR));
    JLE2.addMouseListener(new java.awt.event.MouseAdapter() {
        public void mouseClicked(java.awt.event.MouseEvent evt) {
            JLE2MouseClicked(evt);
        }
    });
    jPanel1_prof.add(JLE2);
    JLE2.setBounds(240, 360, 20, 20);

    JLE1.setFont(new java.awt.Font("MV Boli", 1, 18)); // NOI18N
    JLE1.setText("X");
    JLE1.setCursor(new java.awt.Cursor(java.awt.Cursor.HAND_CURSOR));
    JLE1.addMouseListener(new java.awt.event.MouseAdapter() {
        public void mouseClicked(java.awt.event.MouseEvent evt) {
            JLE1MouseClicked(evt);
        }
    });
    jPanel1_prof.add(JLE1);
    JLE1.setBounds(160, 360, 20, 20);

    JLF3.setFont(new java.awt.Font("MV Boli", 1, 18)); // NOI18N
    JLF3.setText("X");
    JLF3.setCursor(new java.awt.Cursor(java.awt.Cursor.HAND_CURSOR));
    JLF3.addMouseListener(new java.awt.event.MouseAdapter() {
        public void mouseClicked(java.awt.event.MouseEvent evt) {
            JLF3MouseClicked(evt);
        }
    });
    jPanel1_prof.add(JLF3);
    JLF3.setBounds(320, 400, 20, 20);

    JLF1.setFont(new java.awt.Font("MV Boli", 1, 18)); // NOI18N
    JLF1.setText("X");
    JLF1.setCursor(new java.awt.Cursor(java.awt.Cursor.HAND_CURSOR));
    JLF1.addMouseListener(new java.awt.event.MouseAdapter() {
        public void mouseClicked(java.awt.event.MouseEvent evt) {
            JLF1MouseClicked(evt);
        }
    });
    jPanel1_prof.add(JLF1);
    JLF1.setBounds(160, 400, 20, 20);

    JLF2.setFont(new java.awt.Font("MV Boli", 1, 18)); // NOI18N
    JLF2.setText("X");
    JLF2.setCursor(new java.awt.Cursor(java.awt.Cursor.HAND_CURSOR));
    JLF2.addMouseListener(new java.awt.event.MouseAdapter() {
        public void mouseClicked(java.awt.event.MouseEvent evt) {
            JLF2MouseClicked(evt);
        }
    });
    jPanel1_prof.add(JLF2);
    JLF2.setBounds(240, 400, 20, 20);

    JLG3.setFont(new java.awt.Font("MV Boli", 1, 18)); // NOI18N
    JLG3.setText("X");
    JLG3.setCursor(new java.awt.Cursor(java.awt.Cursor.HAND_CURSOR));
    JLG3.addMouseListener(new java.awt.event.MouseAdapter() {
        public void mouseClicked(java.awt.event.MouseEvent evt) {
            JLG3MouseClicked(evt);
        }
    });
    jPanel1_prof.add(JLG3);
    JLG3.setBounds(320, 440, 20, 20);

    JLG2.setFont(new java.awt.Font("MV Boli", 1, 18)); // NOI18N
    JLG2.setText("X");
    JLG2.setCursor(new java.awt.Cursor(java.awt.Cursor.HAND_CURSOR));
    JLG2.addMouseListener(new java.awt.event.MouseAdapter() {
        public void mouseClicked(java.awt.event.MouseEvent evt) {
            JLG2MouseClicked(evt);
        }
    });
    jPanel1_prof.add(JLG2);
    JLG2.setBounds(240, 440, 20, 20);

    JLG1.setFont(new java.awt.Font("MV Boli", 1, 18)); // NOI18N
    JLG1.setText("X");
    JLG1.setCursor(new java.awt.Cursor(java.awt.Cursor.HAND_CURSOR));
    JLG1.addMouseListener(new java.awt.event.MouseAdapter() {
        public void mouseClicked(java.awt.event.MouseEvent evt) {
            JLG1MouseClicked(evt);
        }
    });
    jPanel1_prof.add(JLG1);
    JLG1.setBounds(160, 440, 20, 20);

    JLH1.setFont(new java.awt.Font("MV Boli", 1, 18)); // NOI18N
    JLH1.setText("X");
    JLH1.setCursor(new java.awt.Cursor(java.awt.Cursor.HAND_CURSOR));
    JLH1.addMouseListener(new java.awt.event.MouseAdapter() {
        public void mouseClicked(java.awt.event.MouseEvent evt) {
            JLH1MouseClicked(evt);
        }
    });
    jPanel1_prof.add(JLH1);
    JLH1.setBounds(160, 480, 20, 20);

    JLH2.setFont(new java.awt.Font("MV Boli", 1, 18)); // NOI18N
    JLH2.setText("X");
    JLH2.setCursor(new java.awt.Cursor(java.awt.Cursor.HAND_CURSOR));
    JLH2.addMouseListener(new java.awt.event.MouseAdapter() {
        public void mouseClicked(java.awt.event.MouseEvent evt) {
            JLH2MouseClicked(evt);
        }
    });
    jPanel1_prof.add(JLH2);
    JLH2.setBounds(240, 480, 20, 20);

    JLH3.setFont(new java.awt.Font("MV Boli", 1, 18)); // NOI18N
    JLH3.setText("X");
    JLH3.setCursor(new java.awt.Cursor(java.awt.Cursor.HAND_CURSOR));
    JLH3.addMouseListener(new java.awt.event.MouseAdapter() {
        public void mouseClicked(java.awt.event.MouseEvent evt) {
            JLH3MouseClicked(evt);
        }
    });
    jPanel1_prof.add(JLH3);
    JLH3.setBounds(320, 480, 20, 20);

    JLA2.setFont(new java.awt.Font("MV Boli", 1, 18)); // NOI18N
    JLA2.setText("X");
    JLA2.setCursor(new java.awt.Cursor(java.awt.Cursor.HAND_CURSOR));
    JLA2.addMouseListener(new java.awt.event.MouseAdapter() {
        public void mouseClicked(java.awt.event.MouseEvent evt) {
            JLA2MouseClicked(evt);
        }
    });
    jPanel1_prof.add(JLA2);
    JLA2.setBounds(240, 200, 20, 20);

    EixoP_prof.setEditable(false);
    EixoP_prof.setBackground(new java.awt.Color(255, 255, 255));
    EixoP_prof.setFont(new java.awt.Font("Tahoma", 0, 14)); // NOI18N
    EixoP_prof.setHorizontalAlignment(javax.swing.JTextField.CENTER);
    EixoP_prof.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0, 0)));
    jPanel1_prof.add(EixoP_prof);
    EixoP_prof.setBounds(450, 130, 90, 19);

    EixoR_prof.setEditable(false);
    EixoR_prof.setBackground(new java.awt.Color(255, 255, 255));
    EixoR_prof.setFont(new java.awt.Font("Tahoma", 0, 14)); // NOI18N
    EixoR_prof.setHorizontalAlignment(javax.swing.JTextField.CENTER);
    EixoR_prof.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0, 0)));
    jPanel1_prof.add(EixoR_prof);
    EixoR_prof.setBounds(450, 90, 90, 19);

    JLR_prof.setFont(new java.awt.Font("MV Boli", 1, 18)); // NOI18N
    JLR_prof.setText("X");
    JLR_prof.setCursor(new java.awt.Cursor(java.awt.Cursor.HAND_CURSOR));
    JLR_prof.addMouseListener(new java.awt.event.MouseAdapter() {
        public void mouseClicked(java.awt.event.MouseEvent evt) {
            JLR_profMouseClicked(evt);
        }
    });
    jPanel1_prof.add(JLR_prof);
    JLR_prof.setBounds(420, 90, 20, 20);

    JLP_prof.setFont(new java.awt.Font("MV Boli", 1, 18)); // NOI18N
    JLP_prof.setText("X");
    JLP_prof.setCursor(new java.awt.Cursor(java.awt.Cursor.HAND_CURSOR));
    JLP_prof.addMouseListener(new java.awt.event.MouseAdapter() {
        public void mouseClicked(java.awt.event.MouseEvent evt) {
            JLP_profMouseClicked(evt);
        }
    });
    jPanel1_prof.add(JLP_prof);
    JLP_prof.setBounds(420, 130, 20, 20);

    JLDisc2.setFont(new java.awt.Font("MV Boli", 1, 18)); // NOI18N
    JLDisc2.setText("X");
    JLDisc2.setCursor(new java.awt.Cursor(java.awt.Cursor.HAND_CURSOR));
    JLDisc2.addMouseListener(new java.awt.event.MouseAdapter() {
        public void mouseClicked(java.awt.event.MouseEvent evt) {
            JLDisc2MouseClicked(evt);
        }
    });
    jPanel1_prof.add(JLDisc2);
    JLDisc2.setBounds(550, 90, 20, 20);

    JLDisc3.setFont(new java.awt.Font("MV Boli", 1, 18)); // NOI18N
    JLDisc3.setText("X");
    JLDisc3.setCursor(new java.awt.Cursor(java.awt.Cursor.HAND_CURSOR));
    JLDisc3.addMouseListener(new java.awt.event.MouseAdapter() {
        public void mouseClicked(java.awt.event.MouseEvent evt) {
            JLDisc3MouseClicked(evt);
        }
    });
    jPanel1_prof.add(JLDisc3);
    JLDisc3.setBounds(550, 130, 20, 20);

    JLDisc4.setFont(new java.awt.Font("MV Boli", 1, 18)); // NOI18N
    JLDisc4.setText("X");
    JLDisc4.setCursor(new java.awt.Cursor(java.awt.Cursor.HAND_CURSOR));
    JLDisc4.addMouseListener(new java.awt.event.MouseAdapter() {
        public void mouseClicked(java.awt.event.MouseEvent evt) {
            JLDisc4MouseClicked(evt);
        }
    });
    jPanel1_prof.add(JLDisc4);
    JLDisc4.setBounds(550, 170, 20, 20);

    JLDisc1.setFont(new java.awt.Font("MV Boli", 1, 18)); // NOI18N
    JLDisc1.setText("X");
    JLDisc1.setCursor(new java.awt.Cursor(java.awt.Cursor.HAND_CURSOR));
    JLDisc1.addMouseListener(new java.awt.event.MouseAdapter() {
        public void mouseClicked(java.awt.event.MouseEvent evt) {
            JLDisc1MouseClicked(evt);
        }
    });
    jPanel1_prof.add(JLDisc1);
    JLDisc1.setBounds(550, 50, 20, 20);

    jLabel1.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 204, 0), 2));
    jPanel1_prof.add(jLabel1);
    jLabel1.setBounds(410, 10, 530, 240);

    jLabel2_prof.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 204, 0), 2));
    jPanel1_prof.add(jLabel2_prof);
    jLabel2_prof.setBounds(110, 10, 280, 110);

    jTable1.setBackground(new java.awt.Color(0, 0, 0));
    jTable1.setForeground(new java.awt.Color(255, 255, 255));
    jTable1.setModel(new javax.swing.table.DefaultTableModel(
        new Object [][] {
            {"    1ª"},
            {"    2ª  "},
            {"    3ª"},
            {"    4ª"},
            {"    5ª "},
            {"    6ª"},
            {"    7ª"},
            {"    8ª"},
            {"    9ª"}
        },
        new String [] {
            "Aulas"
        }
    ) {
        boolean[] canEdit = new boolean [] {
            false
        };

        public boolean isCellEditable(int rowIndex, int columnIndex) {
            return canEdit [columnIndex];
        }
    });
    jTable1.setGridColor(new java.awt.Color(0, 204, 0));
    jScrollPane4_prof.setViewportView(jTable1);

    jPanel1_prof.add(jScrollPane4_prof);
    jScrollPane4_prof.setBounds(440, 300, 50, 180);

    buton_editar_prof.setFont(new java.awt.Font("Tahoma", 0, 14)); // NOI18N
    buton_editar_prof.setText("Editar");
    buton_editar_prof.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            buton_editar_profActionPerformed(evt);
        }
    });
    jPanel1_prof.add(buton_editar_prof);
    buton_editar_prof.setBounds(290, 550, 150, 40);

    buton_adicionar_prof.setFont(new java.awt.Font("Tahoma", 0, 14)); // NOI18N
    buton_adicionar_prof.setText("Adicionar");
    buton_adicionar_prof.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            buton_adicionar_profActionPerformed(evt);
        }
    });
    jPanel1_prof.add(buton_adicionar_prof);
    buton_adicionar_prof.setBounds(400, 550, 150, 40);

    buton_deletar_prof.setFont(new java.awt.Font("Tahoma", 0, 14)); // NOI18N
    buton_deletar_prof.setText("Deletar");
    buton_deletar_prof.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            buton_deletar_profActionPerformed(evt);
        }
    });
    jPanel1_prof.add(buton_deletar_prof);
    buton_deletar_prof.setBounds(540, 550, 150, 40);

    jPanel1_prof.setBounds(0, 0, 1160, 900);
    jDesktopPane1_prof.add(jPanel1_prof, javax.swing.JLayeredPane.DEFAULT_LAYER);

    jPanel_prof.add(jDesktopPane1_prof);
    jDesktopPane1_prof.setBounds(10, 10, 960, 600);

    jPanel1.add(jPanel_prof);
    jPanel_prof.setBounds(210, 10, 970, 620);

    jPanel_hora_aula.setBackground(new java.awt.Color(255, 255, 255));
    jPanel_hora_aula.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0, 0), 2));
    jPanel_hora_aula.setLayout(null);

    jDesktopPane5.setBackground(new java.awt.Color(255, 255, 255));
    jDesktopPane5.setForeground(new java.awt.Color(255, 255, 255));

    jPanel6.setBackground(new java.awt.Color(255, 255, 255));
    jPanel6.setLayout(null);

    jScrollPane3.setBackground(new java.awt.Color(0, 0, 0));
    jScrollPane3.setBorder(javax.swing.BorderFactory.createMatteBorder(2, 2, 2, 2, new java.awt.Color(0, 0, 0)));
    jScrollPane3.setForeground(new java.awt.Color(51, 204, 0));
    jScrollPane3.setCursor(new java.awt.Cursor(java.awt.Cursor.DEFAULT_CURSOR));

    jTTabela_HA2.setBackground(new java.awt.Color(0, 0, 0));
    jTTabela_HA2.setFont(new java.awt.Font("Tahoma", 0, 14)); // NOI18N
    jTTabela_HA2.setForeground(new java.awt.Color(255, 255, 255));
    jTTabela_HA2.setModel(tmHA2);
    jTTabela_HA2.setCursor(new java.awt.Cursor(java.awt.Cursor.HAND_CURSOR));
    jTTabela_HA2.setGridColor(new java.awt.Color(255, 255, 255));
    jTTabela_HA2.setInheritsPopupMenu(true);
    jTTabela_HA2.setSelectionBackground(new java.awt.Color(255, 255, 255));
    jTTabela_HA2.setSelectionForeground(new java.awt.Color(0, 0, 0));
    jTTabela_HA2.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
    lsmHA2 = jTTabela_HA2.getSelectionModel();
    lsmHA2.addListSelectionListener(new ListSelectionListener(){
        public void valueChanged(ListSelectionEvent e){
            if(! e.getValueIsAdjusting()){
                JTTabelaLinhaSelecionada2_ha(jTTabela_HA2);
            }
        }
    }
    );
    jScrollPane3.setViewportView(jTTabela_HA2);

    jPanel6.add(jScrollPane3);
    jScrollPane3.setBounds(110, 130, 770, 390);

    jL_deletar_ha.setFont(new java.awt.Font("Tahoma", 0, 14)); // NOI18N
    jL_deletar_ha.setText("Deletar");
    jL_deletar_ha.setFocusPainted(false);
    jL_deletar_ha.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            jL_deletar_haActionPerformed(evt);
        }
    });
    jPanel6.add(jL_deletar_ha);
    jL_deletar_ha.setBounds(480, 620, 150, 40);

    jL_adicionar_ha.setFont(new java.awt.Font("Tahoma", 0, 14)); // NOI18N
    jL_adicionar_ha.setText("Adicionar");
    jL_adicionar_ha.setFocusPainted(false);
    jL_adicionar_ha.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            jL_adicionar_haActionPerformed(evt);
        }
    });
    jPanel6.add(jL_adicionar_ha);
    jL_adicionar_ha.setBounds(440, 490, 150, 40);

    jL_editar_ha.setFont(new java.awt.Font("Tahoma", 0, 14)); // NOI18N
    jL_editar_ha.setText("Editar");
    jL_editar_ha.setFocusPainted(false);
    jL_editar_ha.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            jL_editar_haActionPerformed(evt);
        }
    });
    jPanel6.add(jL_editar_ha);
    jL_editar_ha.setBounds(440, 490, 150, 40);

    jLabel3_ha.setFont(new java.awt.Font("Tahoma", 0, 14)); // NOI18N
    jLabel3_ha.setText("Buscar");
    jLabel3_ha.setFocusPainted(false);
    jLabel3_ha.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            jLabel3_haActionPerformed(evt);
        }
    });
    jPanel6.add(jLabel3_ha);
    jLabel3_ha.setBounds(730, 320, 160, 40);

    jLabel1_ha.setFont(new java.awt.Font("Tahoma", 0, 14)); // NOI18N
    jLabel1_ha.setText("Selecionar");
    jLabel1_ha.setFocusPainted(false);
    jLabel1_ha.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            jLabel1_haActionPerformed(evt);
        }
    });
    jPanel6.add(jLabel1_ha);
    jLabel1_ha.setBounds(730, 180, 160, 40);

    jLabel2_ha.setFont(new java.awt.Font("Tahoma", 0, 14)); // NOI18N
    jLabel2_ha.setText("Selecionar");
    jLabel2_ha.setFocusPainted(false);
    jLabel2_ha.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            jLabel2_haActionPerformed(evt);
        }
    });
    jPanel6.add(jLabel2_ha);
    jLabel2_ha.setBounds(730, 30, 160, 40);

    jLabel4_ha.setFont(new java.awt.Font("Tahoma", 0, 14)); // NOI18N
    jLabel4_ha.setText("ok");
    jLabel4_ha.setFocusPainted(false);
    jLabel4_ha.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            jLabel4_haActionPerformed(evt);
        }
    });
    jPanel6.add(jLabel4_ha);
    jLabel4_ha.setBounds(720, 50, 80, 50);

    jSeparator1_ha.setOrientation(javax.swing.SwingConstants.VERTICAL);
    jPanel6.add(jSeparator1_ha);
    jSeparator1_ha.setBounds(100, 30, 11, 510);

    jRB_adicionar_ha.setBackground(new java.awt.Color(255, 255, 255));
    buttonGroup1.add(jRB_adicionar_ha);
    jRB_adicionar_ha.setFont(new java.awt.Font("Tahoma", 0, 14)); // NOI18N
    jRB_adicionar_ha.setText("<html>Adicionar<br><br>Alterar");
    jRB_adicionar_ha.setFocusPainted(false);
    jRB_adicionar_ha.addItemListener(new java.awt.event.ItemListener() {
        public void itemStateChanged(java.awt.event.ItemEvent evt) {
            jRB_adicionar_haItemStateChanged(evt);
        }
    });
    jPanel6.add(jRB_adicionar_ha);
    jRB_adicionar_ha.setBounds(10, 60, 90, 70);

    jRB_deletar_ha.setBackground(new java.awt.Color(255, 255, 255));
    buttonGroup1.add(jRB_deletar_ha);
    jRB_deletar_ha.setFont(new java.awt.Font("Tahoma", 0, 14)); // NOI18N
    jRB_deletar_ha.setText("Deletar");
    jRB_deletar_ha.setFocusPainted(false);
    jRB_deletar_ha.addItemListener(new java.awt.event.ItemListener() {
        public void itemStateChanged(java.awt.event.ItemEvent evt) {
            jRB_deletar_haItemStateChanged(evt);
        }
    });
    jPanel6.add(jRB_deletar_ha);
    jRB_deletar_ha.setBounds(10, 420, 90, 70);

    jRB_visualizar_ha.setBackground(new java.awt.Color(255, 255, 255));
    buttonGroup1.add(jRB_visualizar_ha);
    jRB_visualizar_ha.setFont(new java.awt.Font("Tahoma", 0, 14)); // NOI18N
    jRB_visualizar_ha.setText("Visualizar");
    jRB_visualizar_ha.setFocusPainted(false);
    jRB_visualizar_ha.addItemListener(new java.awt.event.ItemListener() {
        public void itemStateChanged(java.awt.event.ItemEvent evt) {
            jRB_visualizar_haItemStateChanged(evt);
        }
    });
    jPanel6.add(jRB_visualizar_ha);
    jRB_visualizar_ha.setBounds(10, 240, 90, 70);

    jTF_totalHA_ha.setEditable(false);
    jTF_totalHA_ha.setFont(new java.awt.Font("Tahoma", 0, 14)); // NOI18N
    jTF_totalHA_ha.setHorizontalAlignment(javax.swing.JTextField.CENTER);
    jTF_totalHA_ha.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0, 0)));
    jTF_totalHA_ha.setCaretColor(new java.awt.Color(255, 255, 255));
    jPanel6.add(jTF_totalHA_ha);
    jTF_totalHA_ha.setBounds(350, 550, 50, 30);

    jl_Totalha_ha.setBackground(new java.awt.Color(0, 0, 0));
    jl_Totalha_ha.setFont(new java.awt.Font("Tahoma", 0, 14)); // NOI18N
    jl_Totalha_ha.setText("Total de Horas Aulas:");
    jPanel6.add(jl_Totalha_ha);
    jl_Totalha_ha.setBounds(190, 550, 210, 20);

    jl_descricao1_ha.setBackground(new java.awt.Color(0, 0, 0));
    jl_descricao1_ha.setFont(new java.awt.Font("Tahoma", 0, 14)); // NOI18N
    jl_descricao1_ha.setText("Turma:");
    jPanel6.add(jl_descricao1_ha);
    jl_descricao1_ha.setBounds(510, 60, 70, 30);

    jCB_descricao1_ha.setFont(new java.awt.Font("Tahoma", 0, 14)); // NOI18N
    jPanel6.add(jCB_descricao1_ha);
    jCB_descricao1_ha.setBounds(590, 60, 60, 30);

    jl_serie1_ha.setBackground(new java.awt.Color(0, 0, 0));
    jl_serie1_ha.setFont(new java.awt.Font("Tahoma", 0, 14)); // NOI18N
    jl_serie1_ha.setText("Serie:");
    jPanel6.add(jl_serie1_ha);
    jl_serie1_ha.setBounds(150, 30, 50, 40);

    jRB_1_ha.setBackground(new java.awt.Color(255, 255, 255));
    buttonGroup3.add(jRB_1_ha);
    jRB_1_ha.setFont(new java.awt.Font("Tahoma", 0, 14)); // NOI18N
    jRB_1_ha.setText("1");
    jRB_1_ha.setFocusPainted(false);
    jRB_1_ha.addItemListener(new java.awt.event.ItemListener() {
        public void itemStateChanged(java.awt.event.ItemEvent evt) {
            jRB_1_haItemStateChanged(evt);
        }
    });
    jPanel6.add(jRB_1_ha);
    jRB_1_ha.setBounds(170, 70, 50, 25);

    jRB_2_ha.setBackground(new java.awt.Color(255, 255, 255));
    buttonGroup3.add(jRB_2_ha);
    jRB_2_ha.setFont(new java.awt.Font("Tahoma", 0, 14)); // NOI18N
    jRB_2_ha.setText("2");
    jRB_2_ha.setFocusPainted(false);
    jRB_2_ha.addItemListener(new java.awt.event.ItemListener() {
        public void itemStateChanged(java.awt.event.ItemEvent evt) {
            jRB_2_haItemStateChanged(evt);
        }
    });
    jPanel6.add(jRB_2_ha);
    jRB_2_ha.setBounds(260, 70, 50, 25);

    jRB_3_ha.setBackground(new java.awt.Color(255, 255, 255));
    buttonGroup3.add(jRB_3_ha);
    jRB_3_ha.setFont(new java.awt.Font("Tahoma", 0, 14)); // NOI18N
    jRB_3_ha.setText("3");
    jRB_3_ha.setFocusPainted(false);
    jRB_3_ha.addItemListener(new java.awt.event.ItemListener() {
        public void itemStateChanged(java.awt.event.ItemEvent evt) {
            jRB_3_haItemStateChanged(evt);
        }
    });
    jPanel6.add(jRB_3_ha);
    jRB_3_ha.setBounds(360, 70, 50, 25);

    jCB_ano_ha.setFont(new java.awt.Font("Tahoma", 0, 14)); // NOI18N
    jCB_ano_ha.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            jCB_ano_haActionPerformed(evt);
        }
    });
    jPanel6.add(jCB_ano_ha);
    jCB_ano_ha.setBounds(270, 40, 50, 30);

    jCB_descricao_ha.setFont(new java.awt.Font("Tahoma", 0, 14)); // NOI18N
    jPanel6.add(jCB_descricao_ha);
    jCB_descricao_ha.setBounds(450, 40, 50, 30);

    jl_ano_ha.setBackground(new java.awt.Color(0, 0, 0));
    jl_ano_ha.setFont(new java.awt.Font("Tahoma", 0, 14)); // NOI18N
    jl_ano_ha.setText("Ano:");
    jPanel6.add(jl_ano_ha);
    jl_ano_ha.setBounds(220, 50, 70, 17);

    jl_descricao_ha.setBackground(new java.awt.Color(0, 0, 0));
    jl_descricao_ha.setFont(new java.awt.Font("Tahoma", 0, 14)); // NOI18N
    jl_descricao_ha.setText("Turma:");
    jPanel6.add(jl_descricao_ha);
    jl_descricao_ha.setBounds(390, 50, 90, 17);

    jl_nome_ha.setBackground(new java.awt.Color(0, 0, 0));
    jl_nome_ha.setFont(new java.awt.Font("Tahoma", 0, 14)); // NOI18N
    jl_nome_ha.setText("Professor: ");
    jPanel6.add(jl_nome_ha);
    jl_nome_ha.setBounds(110, 200, 140, 17);

    CB_Professor_ha.setFont(new java.awt.Font("Tahoma", 0, 14)); // NOI18N
    jPanel6.add(CB_Professor_ha);
    CB_Professor_ha.setBounds(300, 190, 260, 30);

    jCB_disciplina_ha.setFont(new java.awt.Font("Tahoma", 0, 14)); // NOI18N
    jPanel6.add(jCB_disciplina_ha);
    jCB_disciplina_ha.setBounds(200, 330, 510, 30);

    jl_disciplina_ha.setBackground(new java.awt.Color(0, 0, 0));
    jl_disciplina_ha.setFont(new java.awt.Font("Tahoma", 0, 14)); // NOI18N
    jl_disciplina_ha.setText(" Disciplina(s):");
    jPanel6.add(jl_disciplina_ha);
    jl_disciplina_ha.setBounds(110, 340, 90, 17);

    jl_horaaula_ha.setBackground(new java.awt.Color(0, 0, 0));
    jl_horaaula_ha.setFont(new java.awt.Font("Tahoma", 0, 14)); // NOI18N
    jl_horaaula_ha.setText(" Horas Aula:");
    jPanel6.add(jl_horaaula_ha);
    jl_horaaula_ha.setBounds(230, 500, 90, 17);

    jTF_horaaula_ha.setFont(new java.awt.Font("Tahoma", 0, 14)); // NOI18N
    jTF_horaaula_ha.setHorizontalAlignment(javax.swing.JTextField.CENTER);
    jTF_horaaula_ha.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0, 0)));
    jPanel6.add(jTF_horaaula_ha);
    jTF_horaaula_ha.setBounds(340, 490, 50, 30);

    jScrollPane4.setBackground(new java.awt.Color(0, 0, 0));
    jScrollPane4.setBorder(javax.swing.BorderFactory.createMatteBorder(2, 2, 2, 2, new java.awt.Color(0, 0, 0)));
    jScrollPane4.setForeground(new java.awt.Color(51, 204, 0));
    jScrollPane4.setCursor(new java.awt.Cursor(java.awt.Cursor.DEFAULT_CURSOR));

    jTTable_hora_aula.setBackground(new java.awt.Color(0, 0, 0));
    jTTable_hora_aula.setForeground(new java.awt.Color(255, 255, 255));
    jTTable_hora_aula.setModel(tmHA
    );
    jTTable_hora_aula.setCursor(new java.awt.Cursor(java.awt.Cursor.HAND_CURSOR));
    jTTable_hora_aula.setGridColor(new java.awt.Color(255, 255, 255));
    jTTable_hora_aula.setInheritsPopupMenu(true);
    jTTable_hora_aula.setSelectionBackground(new java.awt.Color(255, 255, 255));
    jTTable_hora_aula.setSelectionForeground(new java.awt.Color(0, 0, 0));
    jTTable_hora_aula.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
    lsmHA = jTTable_hora_aula.getSelectionModel();
    lsmHA.addListSelectionListener(new ListSelectionListener(){
        public void valueChanged(ListSelectionEvent e){
            if(! e.getValueIsAdjusting()){
                JTTabelaLinhaSelecionada_ha(jTTable_hora_aula);
            }
        }
    }
    );
    jScrollPane4.setViewportView(jTTable_hora_aula);

    jPanel6.add(jScrollPane4);
    jScrollPane4.setBounds(110, 90, 770, 230);

    RB_Professor_ha.setBackground(new java.awt.Color(255, 255, 255));
    buttonGroup2.add(RB_Professor_ha);
    RB_Professor_ha.setFont(new java.awt.Font("Tahoma", 0, 14)); // NOI18N
    RB_Professor_ha.setText("Professor");
    RB_Professor_ha.setFocusPainted(false);
    RB_Professor_ha.addItemListener(new java.awt.event.ItemListener() {
        public void itemStateChanged(java.awt.event.ItemEvent evt) {
            RB_Professor_haItemStateChanged(evt);
        }
    });
    jPanel6.add(RB_Professor_ha);
    RB_Professor_ha.setBounds(700, 10, 90, 25);

    RB_Materia_ha.setBackground(new java.awt.Color(255, 255, 255));
    buttonGroup2.add(RB_Materia_ha);
    RB_Materia_ha.setFont(new java.awt.Font("Tahoma", 0, 14)); // NOI18N
    RB_Materia_ha.setText("Disciplina");
    RB_Materia_ha.setFocusPainted(false);
    RB_Materia_ha.addItemListener(new java.awt.event.ItemListener() {
        public void itemStateChanged(java.awt.event.ItemEvent evt) {
            RB_Materia_haItemStateChanged(evt);
        }
    });
    jPanel6.add(RB_Materia_ha);
    RB_Materia_ha.setBounds(700, 50, 90, 25);

    jl_eixo_ha.setBackground(new java.awt.Color(0, 0, 0));
    jl_eixo_ha.setFont(new java.awt.Font("Tahoma", 0, 14)); // NOI18N
    jl_eixo_ha.setText(" Serie:");
    jPanel6.add(jl_eixo_ha);
    jl_eixo_ha.setBounds(120, 460, 60, 17);

    jl_hora_aulas_ha.setEditable(false);
    jl_hora_aulas_ha.setFont(new java.awt.Font("Tahoma", 0, 14)); // NOI18N
    jl_hora_aulas_ha.setHorizontalAlignment(javax.swing.JTextField.CENTER);
    jl_hora_aulas_ha.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0, 0)));
    jl_hora_aulas_ha.setCaretColor(new java.awt.Color(255, 255, 255));
    jPanel6.add(jl_hora_aulas_ha);
    jl_hora_aulas_ha.setBounds(600, 450, 50, 30);

    jl_eixo1_ha.setBackground(new java.awt.Color(0, 0, 0));
    jl_eixo1_ha.setFont(new java.awt.Font("Tahoma", 0, 14)); // NOI18N
    jl_eixo1_ha.setText(" Turma");
    jPanel6.add(jl_eixo1_ha);
    jl_eixo1_ha.setBounds(260, 460, 50, 17);

    jl_eixo2_ha.setBackground(new java.awt.Color(0, 0, 0));
    jl_eixo2_ha.setFont(new java.awt.Font("Tahoma", 0, 14)); // NOI18N
    jl_eixo2_ha.setText(" Professor:");
    jPanel6.add(jl_eixo2_ha);
    jl_eixo2_ha.setBounds(120, 350, 130, 17);

    jl_eixo3_ha.setBackground(new java.awt.Color(0, 0, 0));
    jl_eixo3_ha.setFont(new java.awt.Font("Tahoma", 0, 14)); // NOI18N
    jl_eixo3_ha.setText(" Disciplina:");
    jPanel6.add(jl_eixo3_ha);
    jl_eixo3_ha.setBounds(120, 400, 80, 17);

    jl_eixo4_ha.setBackground(new java.awt.Color(0, 0, 0));
    jl_eixo4_ha.setFont(new java.awt.Font("Tahoma", 0, 14)); // NOI18N
    jl_eixo4_ha.setText(" Horas Aula:");
    jPanel6.add(jl_eixo4_ha);
    jl_eixo4_ha.setBounds(510, 460, 160, 17);

    jlpesquisa_ha.setBackground(new java.awt.Color(0, 0, 0));
    jlpesquisa_ha.setFont(new java.awt.Font("Tahoma", 0, 14)); // NOI18N
    jlpesquisa_ha.setText("Pesquisar Por ->");
    jPanel6.add(jlpesquisa_ha);
    jlpesquisa_ha.setBounds(590, 30, 101, 17);

    JTF_Pesquisar2_ha.setFont(new java.awt.Font("Tahoma", 0, 14)); // NOI18N
    JTF_Pesquisar2_ha.setHorizontalAlignment(javax.swing.JTextField.CENTER);
    JTF_Pesquisar2_ha.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0, 0)));
    JTF_Pesquisar2_ha.addKeyListener(new java.awt.event.KeyAdapter() {
        public void keyReleased(java.awt.event.KeyEvent evt) {
            JTF_Pesquisar2_haKeyReleased(evt);
        }
    });
    jPanel6.add(JTF_Pesquisar2_ha);
    JTF_Pesquisar2_ha.setBounds(150, 19, 400, 30);

    jl_serie_ha.setEditable(false);
    jl_serie_ha.setFont(new java.awt.Font("Tahoma", 0, 14)); // NOI18N
    jl_serie_ha.setHorizontalAlignment(javax.swing.JTextField.CENTER);
    jl_serie_ha.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0, 0)));
    jl_serie_ha.setCaretColor(new java.awt.Color(255, 255, 255));
    jPanel6.add(jl_serie_ha);
    jl_serie_ha.setBounds(170, 450, 40, 30);

    jl_turma_ha.setEditable(false);
    jl_turma_ha.setFont(new java.awt.Font("Tahoma", 0, 14)); // NOI18N
    jl_turma_ha.setHorizontalAlignment(javax.swing.JTextField.CENTER);
    jl_turma_ha.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0, 0)));
    jl_turma_ha.setCaretColor(new java.awt.Color(255, 255, 255));
    jPanel6.add(jl_turma_ha);
    jl_turma_ha.setBounds(320, 450, 40, 30);

    jl_materia_ha.setEditable(false);
    jl_materia_ha.setFont(new java.awt.Font("Tahoma", 0, 14)); // NOI18N
    jl_materia_ha.setHorizontalAlignment(javax.swing.JTextField.CENTER);
    jl_materia_ha.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0, 0)));
    jl_materia_ha.setCaretColor(new java.awt.Color(255, 255, 255));
    jPanel6.add(jl_materia_ha);
    jl_materia_ha.setBounds(200, 390, 690, 30);

    jl_prof_ha.setEditable(false);
    jl_prof_ha.setFont(new java.awt.Font("Tahoma", 0, 14)); // NOI18N
    jl_prof_ha.setHorizontalAlignment(javax.swing.JTextField.CENTER);
    jl_prof_ha.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0, 0)));
    jl_prof_ha.setCaretColor(new java.awt.Color(255, 255, 255));
    jPanel6.add(jl_prof_ha);
    jl_prof_ha.setBounds(200, 340, 460, 30);

    jL_deletar1_ha.setFont(new java.awt.Font("Tahoma", 0, 14)); // NOI18N
    jL_deletar1_ha.setText("Deletar");
    jL_deletar1_ha.setFocusPainted(false);
    jL_deletar1_ha.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            jL_deletar1_haActionPerformed(evt);
        }
    });
    jPanel6.add(jL_deletar1_ha);
    jL_deletar1_ha.setBounds(440, 540, 150, 40);

    jPanel6.setBounds(0, 0, 1100, 600);
    jDesktopPane5.add(jPanel6, javax.swing.JLayeredPane.DEFAULT_LAYER);

    jPanel_hora_aula.add(jDesktopPane5);
    jDesktopPane5.setBounds(10, 10, 970, 600);

    jPanel1.add(jPanel_hora_aula);
    jPanel_hora_aula.setBounds(210, 10, 990, 620);

    jPanel_curso.setBackground(new java.awt.Color(255, 255, 255));
    jPanel_curso.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0, 0), 2));
    jPanel_curso.setLayout(null);

    jDesktopPane1.setBackground(new java.awt.Color(255, 255, 255));

    jPanel2.setBackground(new java.awt.Color(255, 255, 255));
    jPanel2.setLayout(null);

    jSeparator1_curso.setOrientation(javax.swing.SwingConstants.VERTICAL);
    jSeparator1_curso.setPreferredSize(new java.awt.Dimension(3, 0));
    jPanel2.add(jSeparator1_curso);
    jSeparator1_curso.setBounds(170, 20, 11, 340);

    jRB_editar_curso.setBackground(new java.awt.Color(255, 255, 255));
    buttonGroup1.add(jRB_editar_curso);
    jRB_editar_curso.setFont(new java.awt.Font("Tahoma", 0, 14)); // NOI18N
    jRB_editar_curso.setText("Editar");
    jRB_editar_curso.setFocusPainted(false);
    jRB_editar_curso.addItemListener(new java.awt.event.ItemListener() {
        public void itemStateChanged(java.awt.event.ItemEvent evt) {
            jRB_editar_cursoItemStateChanged(evt);
        }
    });
    jPanel2.add(jRB_editar_curso);
    jRB_editar_curso.setBounds(6, 159, 140, 25);

    jRB_adicionar_curso.setBackground(new java.awt.Color(255, 255, 255));
    buttonGroup1.add(jRB_adicionar_curso);
    jRB_adicionar_curso.setFont(new java.awt.Font("Tahoma", 0, 14)); // NOI18N
    jRB_adicionar_curso.setText("Adicionar");
    jRB_adicionar_curso.setFocusPainted(false);
    jRB_adicionar_curso.addItemListener(new java.awt.event.ItemListener() {
        public void itemStateChanged(java.awt.event.ItemEvent evt) {
            jRB_adicionar_cursoItemStateChanged(evt);
        }
    });
    jPanel2.add(jRB_adicionar_curso);
    jRB_adicionar_curso.setBounds(6, 32, 150, 25);

    jRB_deletar_curso.setBackground(new java.awt.Color(255, 255, 255));
    buttonGroup1.add(jRB_deletar_curso);
    jRB_deletar_curso.setFont(new java.awt.Font("Tahoma", 0, 14)); // NOI18N
    jRB_deletar_curso.setText("Deletar");
    jRB_deletar_curso.setFocusPainted(false);
    jRB_deletar_curso.addItemListener(new java.awt.event.ItemListener() {
        public void itemStateChanged(java.awt.event.ItemEvent evt) {
            jRB_deletar_cursoItemStateChanged(evt);
        }
    });
    jPanel2.add(jRB_deletar_curso);
    jRB_deletar_curso.setBounds(6, 279, 150, 25);

    jTF_nomecurso_curso.setFont(new java.awt.Font("Tahoma", 0, 14)); // NOI18N
    jTF_nomecurso_curso.setHorizontalAlignment(javax.swing.JTextField.CENTER);
    jTF_nomecurso_curso.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0, 0)));
    jPanel2.add(jTF_nomecurso_curso);
    jTF_nomecurso_curso.setBounds(360, 90, 210, 30);

    jl_descricao_curso.setBackground(new java.awt.Color(0, 0, 0));
    jl_descricao_curso.setFont(new java.awt.Font("Tahoma", 0, 14)); // NOI18N
    jl_descricao_curso.setText("Turma:");
    jPanel2.add(jl_descricao_curso);
    jl_descricao_curso.setBounds(270, 170, 140, 17);

    jTF_descricaonovo_curso.setFont(new java.awt.Font("Tahoma", 0, 14)); // NOI18N
    jTF_descricaonovo_curso.setHorizontalAlignment(javax.swing.JTextField.CENTER);
    jTF_descricaonovo_curso.setToolTipText("Digite aqui uma nova descrição para o curso");
    jTF_descricaonovo_curso.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0, 0)));
    jTF_descricaonovo_curso.addKeyListener(new java.awt.event.KeyAdapter() {
        public void keyReleased(java.awt.event.KeyEvent evt) {
            jTF_descricaonovo_cursoKeyReleased(evt);
        }
    });
    jPanel2.add(jTF_descricaonovo_curso);
    jTF_descricaonovo_curso.setBounds(480, 190, 66, 30);

    jTF_descricao_curso.setFont(new java.awt.Font("Tahoma", 0, 14)); // NOI18N
    jTF_descricao_curso.setHorizontalAlignment(javax.swing.JTextField.CENTER);
    jTF_descricao_curso.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0, 0)));
    jTF_descricao_curso.addKeyListener(new java.awt.event.KeyAdapter() {
        public void keyReleased(java.awt.event.KeyEvent evt) {
            jTF_descricao_cursoKeyReleased(evt);
        }
    });
    jPanel2.add(jTF_descricao_curso);
    jTF_descricao_curso.setBounds(430, 170, 60, 30);

    jl_descricao3_curso.setBackground(new java.awt.Color(0, 0, 0));
    jl_descricao3_curso.setFont(new java.awt.Font("Tahoma", 0, 14)); // NOI18N
    jl_descricao3_curso.setText("Turma:");
    jPanel2.add(jl_descricao3_curso);
    jl_descricao3_curso.setBounds(280, 160, 140, 17);

    jl_curso3_curso.setBackground(new java.awt.Color(0, 0, 0));
    jl_curso3_curso.setFont(new java.awt.Font("Tahoma", 0, 14)); // NOI18N
    jl_curso3_curso.setText("Curso:");
    jPanel2.add(jl_curso3_curso);
    jl_curso3_curso.setBounds(280, 100, 100, 17);

    jl_curso2_curso.setBackground(new java.awt.Color(0, 0, 0));
    jl_curso2_curso.setFont(new java.awt.Font("Tahoma", 0, 14)); // NOI18N
    jl_curso2_curso.setText("Curso:");
    jPanel2.add(jl_curso2_curso);
    jl_curso2_curso.setBounds(280, 50, 100, 17);

    jCB_curso1_curso.setFont(new java.awt.Font("Tahoma", 0, 14)); // NOI18N
    jCB_curso1_curso.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            jCB_curso1_cursoActionPerformed(evt);
        }
    });
    jPanel2.add(jCB_curso1_curso);
    jCB_curso1_curso.setBounds(390, 90, 180, 30);

    jCB_descricao1_curso.setFont(new java.awt.Font("Tahoma", 0, 14)); // NOI18N
    jCB_descricao1_curso.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "Item 1", "Item 2", "Item 3", "Item 4" }));
    jPanel2.add(jCB_descricao1_curso);
    jCB_descricao1_curso.setBounds(450, 160, 60, 23);

    jl_curso_curso.setBackground(new java.awt.Color(0, 0, 0));
    jl_curso_curso.setFont(new java.awt.Font("Tahoma", 0, 14)); // NOI18N
    jl_curso_curso.setText("Curso:");
    jPanel2.add(jl_curso_curso);
    jl_curso_curso.setBounds(270, 90, 100, 17);

    jCB_descricao_curso.setFont(new java.awt.Font("Tahoma", 0, 14)); // NOI18N
    jPanel2.add(jCB_descricao_curso);
    jCB_descricao_curso.setBounds(300, 190, 60, 23);

    jCB_curso_curso.setFont(new java.awt.Font("Tahoma", 0, 14)); // NOI18N
    jCB_curso_curso.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "Item 1", "Item 2", "Item 3", "Item 4" }));
    jCB_curso_curso.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            jCB_curso_cursoActionPerformed(evt);
        }
    });
    jPanel2.add(jCB_curso_curso);
    jCB_curso_curso.setBounds(270, 90, 140, 30);

    jTF_cursonovo_curso.setFont(new java.awt.Font("Tahoma", 0, 14)); // NOI18N
    jTF_cursonovo_curso.setHorizontalAlignment(javax.swing.JTextField.CENTER);
    jTF_cursonovo_curso.setToolTipText("Digite aqui o novo nome para o curso");
    jTF_cursonovo_curso.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0, 0)));
    jPanel2.add(jTF_cursonovo_curso);
    jTF_cursonovo_curso.setBounds(430, 90, 170, 30);

    jl_descricao2_curso.setBackground(new java.awt.Color(0, 0, 0));
    jl_descricao2_curso.setFont(new java.awt.Font("Tahoma", 0, 14)); // NOI18N
    jl_descricao2_curso.setText("Turma:");
    jPanel2.add(jl_descricao2_curso);
    jl_descricao2_curso.setBounds(280, 150, 140, 17);

    buton_deletar_curso.setFont(new java.awt.Font("Tahoma", 0, 14)); // NOI18N
    buton_deletar_curso.setText("Deletar");
    buton_deletar_curso.setFocusPainted(false);
    buton_deletar_curso.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            buton_deletar_cursoActionPerformed(evt);
        }
    });
    jPanel2.add(buton_deletar_curso);
    buton_deletar_curso.setBounds(420, 300, 130, 40);

    buton_adicionar_curso.setFont(new java.awt.Font("Tahoma", 0, 14)); // NOI18N
    buton_adicionar_curso.setText("Cadastrar");
    buton_adicionar_curso.setFocusPainted(false);
    buton_adicionar_curso.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            buton_adicionar_cursoActionPerformed(evt);
        }
    });
    jPanel2.add(buton_adicionar_curso);
    buton_adicionar_curso.setBounds(400, 300, 130, 40);

    buton_editar_curso.setFont(new java.awt.Font("Tahoma", 0, 14)); // NOI18N
    buton_editar_curso.setText("Editar");
    buton_editar_curso.setFocusPainted(false);
    buton_editar_curso.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            buton_editar_cursoActionPerformed(evt);
        }
    });
    jPanel2.add(buton_editar_curso);
    buton_editar_curso.setBounds(400, 300, 130, 40);

    jPanel2.setBounds(0, 0, 850, 400);
    jDesktopPane1.add(jPanel2, javax.swing.JLayeredPane.DEFAULT_LAYER);

    jPanel_curso.add(jDesktopPane1);
    jDesktopPane1.setBounds(160, 90, 850, 400);

    jPanel1.add(jPanel_curso);
    jPanel_curso.setBounds(210, 10, 980, 620);

    jPanel_serie.setBackground(new java.awt.Color(255, 255, 255));
    jPanel_serie.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0, 0), 2));
    jPanel_serie.setLayout(null);

    jPanel3.setBackground(new java.awt.Color(255, 255, 255));
    jPanel3.setLayout(null);

    jSeparator1_serie.setOrientation(javax.swing.SwingConstants.VERTICAL);
    jPanel3.add(jSeparator1_serie);
    jSeparator1_serie.setBounds(120, 100, 11, 370);

    jRB_adicionar_serie.setBackground(new java.awt.Color(255, 255, 255));
    buttonGroup1.add(jRB_adicionar_serie);
    jRB_adicionar_serie.setFont(new java.awt.Font("Tahoma", 0, 14)); // NOI18N
    jRB_adicionar_serie.setText("Adicionar");
    jRB_adicionar_serie.setFocusPainted(false);
    jRB_adicionar_serie.addItemListener(new java.awt.event.ItemListener() {
        public void itemStateChanged(java.awt.event.ItemEvent evt) {
            jRB_adicionar_serieItemStateChanged(evt);
        }
    });
    jPanel3.add(jRB_adicionar_serie);
    jRB_adicionar_serie.setBounds(10, 150, 100, 25);

    jRB_deletar_serie.setBackground(new java.awt.Color(255, 255, 255));
    buttonGroup1.add(jRB_deletar_serie);
    jRB_deletar_serie.setFont(new java.awt.Font("Tahoma", 0, 14)); // NOI18N
    jRB_deletar_serie.setText("<html>Deletar<br><br>Visualizar");
    jRB_deletar_serie.setFocusPainted(false);
    jRB_deletar_serie.addItemListener(new java.awt.event.ItemListener() {
        public void itemStateChanged(java.awt.event.ItemEvent evt) {
            jRB_deletar_serieItemStateChanged(evt);
        }
    });
    jPanel3.add(jRB_deletar_serie);
    jRB_deletar_serie.setBounds(10, 320, 110, 80);

    jl_serie_serie.setBackground(new java.awt.Color(255, 255, 255));
    jl_serie_serie.setFont(new java.awt.Font("Tahoma", 0, 14)); // NOI18N
    jl_serie_serie.setText("Serie:");
    jPanel3.add(jl_serie_serie);
    jl_serie_serie.setBounds(210, 150, 79, 17);

    jRB_1_serie.setBackground(new java.awt.Color(255, 255, 255));
    buttonGroup2.add(jRB_1_serie);
    jRB_1_serie.setFont(new java.awt.Font("Tahoma", 0, 14)); // NOI18N
    jRB_1_serie.setText("1");
    jRB_1_serie.setFocusPainted(false);
    jPanel3.add(jRB_1_serie);
    jRB_1_serie.setBounds(230, 190, 50, 25);

    jRB_3_serie.setBackground(new java.awt.Color(255, 255, 255));
    buttonGroup2.add(jRB_3_serie);
    jRB_3_serie.setFont(new java.awt.Font("Tahoma", 0, 14)); // NOI18N
    jRB_3_serie.setText("3");
    jRB_3_serie.setFocusPainted(false);
    jPanel3.add(jRB_3_serie);
    jRB_3_serie.setBounds(230, 310, 50, 25);

    jCB_curso_serie.setFont(new java.awt.Font("Tahoma", 0, 14)); // NOI18N
    jCB_curso_serie.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            jCB_curso_serieActionPerformed(evt);
        }
    });
    jPanel3.add(jCB_curso_serie);
    jCB_curso_serie.setBounds(430, 240, 190, 30);

    jl_curso_serie.setBackground(new java.awt.Color(255, 255, 255));
    jl_curso_serie.setFont(new java.awt.Font("Tahoma", 0, 14)); // NOI18N
    jl_curso_serie.setText("Curso:");
    jPanel3.add(jl_curso_serie);
    jl_curso_serie.setBounds(330, 240, 79, 17);

    jl_descricao_serie.setBackground(new java.awt.Color(255, 255, 255));
    jl_descricao_serie.setFont(new java.awt.Font("Tahoma", 0, 14)); // NOI18N
    jl_descricao_serie.setText("Turma:");
    jPanel3.add(jl_descricao_serie);
    jl_descricao_serie.setBounds(670, 240, 118, 17);

    jCB_descricao_serie.setFont(new java.awt.Font("Tahoma", 0, 14)); // NOI18N
    jPanel3.add(jCB_descricao_serie);
    jCB_descricao_serie.setBounds(790, 240, 50, 30);

    jRB_2_serie.setBackground(new java.awt.Color(255, 255, 255));
    buttonGroup2.add(jRB_2_serie);
    jRB_2_serie.setFont(new java.awt.Font("Tahoma", 0, 14)); // NOI18N
    jRB_2_serie.setText("2");
    jRB_2_serie.setFocusPainted(false);
    jPanel3.add(jRB_2_serie);
    jRB_2_serie.setBounds(230, 250, 50, 25);

    jScrollPane5.setBackground(new java.awt.Color(0, 0, 0));
    jScrollPane5.setBorder(javax.swing.BorderFactory.createMatteBorder(2, 2, 2, 2, new java.awt.Color(0, 0, 0)));
    jScrollPane5.setForeground(new java.awt.Color(51, 204, 0));
    jScrollPane5.setCursor(new java.awt.Cursor(java.awt.Cursor.DEFAULT_CURSOR));

    jTTabela_Serie.setBackground(new java.awt.Color(0, 0, 0));
    jTTabela_Serie.setFont(new java.awt.Font("Tahoma", 0, 12)); // NOI18N
    jTTabela_Serie.setForeground(new java.awt.Color(255, 255, 255));
    jTTabela_Serie.setModel(tmSerie);
    jTTabela_Serie.setCursor(new java.awt.Cursor(java.awt.Cursor.HAND_CURSOR));
    jTTabela_Serie.setGridColor(new java.awt.Color(255, 255, 255));
    jTTabela_Serie.setInheritsPopupMenu(true);
    jTTabela_Serie.setSelectionBackground(new java.awt.Color(255, 255, 255));
    jTTabela_Serie.setSelectionForeground(new java.awt.Color(0, 0, 0));
    jTTabela_Serie.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
    lsmSerie = jTTabela_Serie.getSelectionModel();
    lsmSerie.addListSelectionListener(new ListSelectionListener(){
        public void valueChanged(ListSelectionEvent e){
            if(! e.getValueIsAdjusting()){
                JTTabelaLinhaSelecionada_serie(jTTabela_Serie);
            }
        }
    }
    );
    jScrollPane5.setViewportView(jTTabela_Serie);

    jPanel3.add(jScrollPane5);
    jScrollPane5.setBounds(200, 140, 670, 220);

    buton_adicionar_serie.setFont(new java.awt.Font("Tahoma", 0, 14)); // NOI18N
    buton_adicionar_serie.setText("Cadastrar");
    buton_adicionar_serie.setFocusPainted(false);
    buton_adicionar_serie.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            buton_adicionar_serieActionPerformed(evt);
        }
    });
    jPanel3.add(buton_adicionar_serie);
    buton_adicionar_serie.setBounds(460, 395, 170, 40);

    buton_deletar_serie.setFont(new java.awt.Font("Tahoma", 0, 14)); // NOI18N
    buton_deletar_serie.setText("Deletar");
    buton_deletar_serie.setFocusPainted(false);
    buton_deletar_serie.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            buton_deletar_serieActionPerformed(evt);
        }
    });
    jPanel3.add(buton_deletar_serie);
    buton_deletar_serie.setBounds(460, 395, 170, 40);

    jPanel3.setBounds(0, 0, 1010, 900);
    jDesktopPane2.add(jPanel3, javax.swing.JLayeredPane.DEFAULT_LAYER);

    jPanel_serie.add(jDesktopPane2);
    jDesktopPane2.setBounds(10, 10, 980, 600);

    jPanel1.add(jPanel_serie);
    jPanel_serie.setBounds(210, 10, 990, 620);

    jPanel_disciplina.setBackground(new java.awt.Color(255, 255, 255));
    jPanel_disciplina.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0, 0), 2));
    jPanel_disciplina.setLayout(null);

    jDesktopPane3.setBackground(new java.awt.Color(255, 255, 255));
    jDesktopPane3.setForeground(new java.awt.Color(255, 255, 255));

    jPanel4.setBackground(new java.awt.Color(255, 255, 255));
    jPanel4.setLayout(null);

    jSeparator1_disc.setOrientation(javax.swing.SwingConstants.VERTICAL);
    jPanel4.add(jSeparator1_disc);
    jSeparator1_disc.setBounds(120, 20, 11, 540);

    buton_deletar_disc.setFont(new java.awt.Font("Tahoma", 0, 14)); // NOI18N
    buton_deletar_disc.setText("Deletar");
    buton_deletar_disc.setFocusPainted(false);
    buton_deletar_disc.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            buton_deletar_discActionPerformed(evt);
        }
    });
    jPanel4.add(buton_deletar_disc);
    buton_deletar_disc.setBounds(600, 510, 200, 40);

    buton_editar_disc.setFont(new java.awt.Font("Tahoma", 0, 14)); // NOI18N
    buton_editar_disc.setText("Editar");
    buton_editar_disc.setFocusPainted(false);
    buton_editar_disc.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            buton_editar_discActionPerformed(evt);
        }
    });
    jPanel4.add(buton_editar_disc);
    buton_editar_disc.setBounds(280, 510, 200, 40);

    buton_adicionar_disc.setFont(new java.awt.Font("Tahoma", 0, 14)); // NOI18N
    buton_adicionar_disc.setText("Cadastrar");
    buton_adicionar_disc.setFocusPainted(false);
    buton_adicionar_disc.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            buton_adicionar_discActionPerformed(evt);
        }
    });
    jPanel4.add(buton_adicionar_disc);
    buton_adicionar_disc.setBounds(470, 510, 190, 40);

    jRB_edt_del_disc.setBackground(new java.awt.Color(255, 255, 255));
    buttonGroup1.add(jRB_edt_del_disc);
    jRB_edt_del_disc.setFont(new java.awt.Font("Tahoma", 0, 14)); // NOI18N
    jRB_edt_del_disc.setText("<HTML>Editar<br><br>Deletar");
    jRB_edt_del_disc.setFocusPainted(false);
    jRB_edt_del_disc.addItemListener(new java.awt.event.ItemListener() {
        public void itemStateChanged(java.awt.event.ItemEvent evt) {
            jRB_edt_del_discItemStateChanged(evt);
        }
    });
    jPanel4.add(jRB_edt_del_disc);
    jRB_edt_del_disc.setBounds(10, 230, 80, 90);

    jRB_adicionar_disc.setBackground(new java.awt.Color(255, 255, 255));
    buttonGroup1.add(jRB_adicionar_disc);
    jRB_adicionar_disc.setFont(new java.awt.Font("Tahoma", 0, 14)); // NOI18N
    jRB_adicionar_disc.setText("Adicionar");
    jRB_adicionar_disc.setFocusPainted(false);
    jRB_adicionar_disc.addItemListener(new java.awt.event.ItemListener() {
        public void itemStateChanged(java.awt.event.ItemEvent evt) {
            jRB_adicionar_discItemStateChanged(evt);
        }
    });
    jPanel4.add(jRB_adicionar_disc);
    jRB_adicionar_disc.setBounds(10, 90, 90, 25);

    jRB_visualizar_disc.setBackground(new java.awt.Color(255, 255, 255));
    buttonGroup1.add(jRB_visualizar_disc);
    jRB_visualizar_disc.setFont(new java.awt.Font("Tahoma", 0, 14)); // NOI18N
    jRB_visualizar_disc.setText("Visualizar");
    jRB_visualizar_disc.setFocusPainted(false);
    jRB_visualizar_disc.addItemListener(new java.awt.event.ItemListener() {
        public void itemStateChanged(java.awt.event.ItemEvent evt) {
            jRB_visualizar_discItemStateChanged(evt);
        }
    });
    jRB_visualizar_disc.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            jRB_visualizar_discActionPerformed(evt);
        }
    });
    jPanel4.add(jRB_visualizar_disc);
    jRB_visualizar_disc.setBounds(10, 450, 100, 25);

    jL_ok_disc.setFont(new java.awt.Font("Tahoma", 0, 14)); // NOI18N
    jL_ok_disc.setText("ok");
    jL_ok_disc.setFocusPainted(false);
    jL_ok_disc.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            jL_ok_discActionPerformed(evt);
        }
    });
    jPanel4.add(jL_ok_disc);
    jL_ok_disc.setBounds(710, 70, 80, 50);

    jl_nome_disc.setBackground(new java.awt.Color(0, 0, 0));
    jl_nome_disc.setFont(new java.awt.Font("Tahoma", 0, 14)); // NOI18N
    jl_nome_disc.setText("Nome:");
    jPanel4.add(jl_nome_disc);
    jl_nome_disc.setBounds(170, 80, 100, 30);

    jTF_nomedisc_disc.setFont(new java.awt.Font("Tahoma", 0, 14)); // NOI18N
    jTF_nomedisc_disc.setHorizontalAlignment(javax.swing.JTextField.CENTER);
    jTF_nomedisc_disc.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0, 0)));
    jPanel4.add(jTF_nomedisc_disc);
    jTF_nomedisc_disc.setBounds(270, 80, 590, 30);

    jl_eixo_disc.setBackground(new java.awt.Color(0, 0, 0));
    jl_eixo_disc.setFont(new java.awt.Font("Tahoma", 0, 14)); // NOI18N
    jl_eixo_disc.setText(" Eixo:");
    jPanel4.add(jl_eixo_disc);
    jl_eixo_disc.setBounds(170, 210, 100, 31);

    jRB_regular_disc.setBackground(new java.awt.Color(255, 255, 255));
    buttonGroup2.add(jRB_regular_disc);
    jRB_regular_disc.setFont(new java.awt.Font("Tahoma", 0, 14)); // NOI18N
    jRB_regular_disc.setText("Regular");
    jRB_regular_disc.setFocusPainted(false);
    jRB_regular_disc.addItemListener(new java.awt.event.ItemListener() {
        public void itemStateChanged(java.awt.event.ItemEvent evt) {
            jRB_regular_discItemStateChanged(evt);
        }
    });
    jPanel4.add(jRB_regular_disc);
    jRB_regular_disc.setBounds(350, 210, 150, 25);

    jRB_profissional_disc.setBackground(new java.awt.Color(255, 255, 255));
    buttonGroup2.add(jRB_profissional_disc);
    jRB_profissional_disc.setFont(new java.awt.Font("Tahoma", 0, 14)); // NOI18N
    jRB_profissional_disc.setText("Profissional");
    jRB_profissional_disc.setFocusPainted(false);
    jRB_profissional_disc.addItemListener(new java.awt.event.ItemListener() {
        public void itemStateChanged(java.awt.event.ItemEvent evt) {
            jRB_profissional_discItemStateChanged(evt);
        }
    });
    jPanel4.add(jRB_profissional_disc);
    jRB_profissional_disc.setBounds(620, 210, 190, 25);

    jCB_curso_disc.setFont(new java.awt.Font("Tahoma", 0, 14)); // NOI18N
    jPanel4.add(jCB_curso_disc);
    jCB_curso_disc.setBounds(460, 360, 200, 30);

    jl_curso_disc.setBackground(new java.awt.Color(0, 0, 0));
    jl_curso_disc.setFont(new java.awt.Font("Tahoma", 0, 14)); // NOI18N
    jl_curso_disc.setText("Curso:");
    jPanel4.add(jl_curso_disc);
    jl_curso_disc.setBounds(520, 320, 100, 31);

    jCB_curso1_disc.setFont(new java.awt.Font("Tahoma", 0, 14)); // NOI18N
    jCB_curso1_disc.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "Item 1", "Item 2", "Item 3", "Item 4" }));
    jPanel4.add(jCB_curso1_disc);
    jCB_curso1_disc.setBounds(420, 80, 170, 30);

    jl_curso2_disc.setBackground(new java.awt.Color(0, 0, 0));
    jl_curso2_disc.setFont(new java.awt.Font("Tahoma", 0, 14)); // NOI18N
    jl_curso2_disc.setText("Curso:");
    jPanel4.add(jl_curso2_disc);
    jl_curso2_disc.setBounds(320, 70, 100, 50);

    jScrollPane1.setBackground(new java.awt.Color(0, 0, 0));
    jScrollPane1.setBorder(javax.swing.BorderFactory.createMatteBorder(2, 2, 2, 2, new java.awt.Color(0, 0, 0)));
    jScrollPane1.setForeground(new java.awt.Color(255, 51, 0));
    jScrollPane1.setCursor(new java.awt.Cursor(java.awt.Cursor.DEFAULT_CURSOR));
    jScrollPane1.setFont(new java.awt.Font("Tahoma", 0, 14)); // NOI18N

    jTTable_disc.setFont(new java.awt.Font("Tahoma", 0, 12)); // NOI18N
    jTTable_disc.setModel(tmDisc        );
    jTTable_disc.setCursor(new java.awt.Cursor(java.awt.Cursor.HAND_CURSOR));
    jTTable_disc.setGridColor(new java.awt.Color(255, 255, 255));
    jTTable_disc.setInheritsPopupMenu(true);
    jTTable_disc.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
    lsmDisc = jTTable_disc.getSelectionModel();
    lsmDisc.addListSelectionListener(new ListSelectionListener(){
        public void valueChanged(ListSelectionEvent e){
            if(! e.getValueIsAdjusting()){
                JTTabelaLinhaSelecionada_disc(jTTable_disc);
            }
        }
    }
    );
    jScrollPane1.setViewportView(jTTable_disc);

    jPanel4.add(jScrollPane1);
    jScrollPane1.setBounds(130, 170, 760, 300);

    jTF_pesquisar_disc.setFont(new java.awt.Font("Tahoma", 0, 14)); // NOI18N
    jTF_pesquisar_disc.setHorizontalAlignment(javax.swing.JTextField.CENTER);
    jTF_pesquisar_disc.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0, 0)));
    jTF_pesquisar_disc.addKeyListener(new java.awt.event.KeyAdapter() {
        public void keyReleased(java.awt.event.KeyEvent evt) {
            jTF_pesquisar_discKeyReleased(evt);
        }
    });
    jPanel4.add(jTF_pesquisar_disc);
    jTF_pesquisar_disc.setBounds(160, 30, 520, 30);

    jl_pesquisar_disc.setBackground(new java.awt.Color(0, 0, 0));
    jl_pesquisar_disc.setFont(new java.awt.Font("Tahoma", 0, 14)); // NOI18N
    jl_pesquisar_disc.setText("Pesquisar");
    jPanel4.add(jl_pesquisar_disc);
    jl_pesquisar_disc.setBounds(720, 30, 150, 30);

    jScrollPane2.setBackground(new java.awt.Color(0, 0, 0));
    jScrollPane2.setBorder(javax.swing.BorderFactory.createMatteBorder(2, 2, 2, 2, new java.awt.Color(0, 0, 0)));
    jScrollPane2.setForeground(new java.awt.Color(51, 204, 0));
    jScrollPane2.setCursor(new java.awt.Cursor(java.awt.Cursor.DEFAULT_CURSOR));

    jTTabela_Disc2.setBackground(new java.awt.Color(0, 0, 0));
    jTTabela_Disc2.setFont(new java.awt.Font("Tahoma", 0, 12)); // NOI18N
    jTTabela_Disc2.setForeground(new java.awt.Color(255, 255, 255));
    jTTabela_Disc2.setModel(tmDisc2);
    jTTabela_Disc2.setCursor(new java.awt.Cursor(java.awt.Cursor.HAND_CURSOR));
    jTTabela_Disc2.setGridColor(new java.awt.Color(255, 255, 255));
    jTTabela_Disc2.setSelectionBackground(new java.awt.Color(255, 255, 255));
    jTTabela_Disc2.setSelectionForeground(new java.awt.Color(0, 0, 0));
    jTTabela_Disc2.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
    lsmDisc2 = jTTabela_Disc2.getSelectionModel();
    lsmDisc2.addListSelectionListener(new ListSelectionListener(){
        public void valueChanged(ListSelectionEvent e){
            if(! e.getValueIsAdjusting()){
                JTTabelaLinhaSelecionada2_disc(jTTabela_Disc2);
            }
        }
    }
    );
    jScrollPane2.setViewportView(jTTabela_Disc2);

    jPanel4.add(jScrollPane2);
    jScrollPane2.setBounds(140, 80, 740, 160);

    jCB_cursoalt_disc.setFont(new java.awt.Font("Tahoma", 0, 14)); // NOI18N
    jPanel4.add(jCB_cursoalt_disc);
    jCB_cursoalt_disc.setBounds(590, 380, 180, 30);

    jl_nomealt_disc.setBackground(new java.awt.Color(0, 0, 0));
    jl_nomealt_disc.setFont(new java.awt.Font("Tahoma", 0, 14)); // NOI18N
    jl_nomealt_disc.setText("Nome:");
    jPanel4.add(jl_nomealt_disc);
    jl_nomealt_disc.setBounds(150, 300, 100, 30);

    jl_cursoalt_disc.setBackground(new java.awt.Color(0, 0, 0));
    jl_cursoalt_disc.setFont(new java.awt.Font("Tahoma", 0, 14)); // NOI18N
    jl_cursoalt_disc.setText("Curso:");
    jPanel4.add(jl_cursoalt_disc);
    jl_cursoalt_disc.setBounds(590, 350, 150, 31);

    jRB_profissionalalt_disc.setBackground(new java.awt.Color(255, 255, 255));
    buttonGroup3.add(jRB_profissionalalt_disc);
    jRB_profissionalalt_disc.setFont(new java.awt.Font("Tahoma", 0, 14)); // NOI18N
    jRB_profissionalalt_disc.setText("Profissional");
    jRB_profissionalalt_disc.setFocusPainted(false);
    jRB_profissionalalt_disc.addItemListener(new java.awt.event.ItemListener() {
        public void itemStateChanged(java.awt.event.ItemEvent evt) {
            jRB_profissionalalt_discItemStateChanged(evt);
        }
    });
    jPanel4.add(jRB_profissionalalt_disc);
    jRB_profissionalalt_disc.setBounds(230, 410, 190, 25);

    jRB_regularalt_disc.setBackground(new java.awt.Color(255, 255, 255));
    buttonGroup3.add(jRB_regularalt_disc);
    jRB_regularalt_disc.setFont(new java.awt.Font("Tahoma", 0, 14)); // NOI18N
    jRB_regularalt_disc.setText("Regular");
    jRB_regularalt_disc.setFocusPainted(false);
    jRB_regularalt_disc.addItemListener(new java.awt.event.ItemListener() {
        public void itemStateChanged(java.awt.event.ItemEvent evt) {
            jRB_regularalt_discItemStateChanged(evt);
        }
    });
    jPanel4.add(jRB_regularalt_disc);
    jRB_regularalt_disc.setBounds(230, 360, 150, 25);

    jl_eixoalt_disc.setBackground(new java.awt.Color(0, 0, 0));
    jl_eixoalt_disc.setFont(new java.awt.Font("Tahoma", 0, 14)); // NOI18N
    jl_eixoalt_disc.setText(" Eixo:");
    jPanel4.add(jl_eixoalt_disc);
    jl_eixoalt_disc.setBounds(150, 390, 100, 31);

    jTF_nomediscalt_disc.setFont(new java.awt.Font("Tahoma", 0, 14)); // NOI18N
    jTF_nomediscalt_disc.setHorizontalAlignment(javax.swing.JTextField.CENTER);
    jTF_nomediscalt_disc.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0, 0)));
    jPanel4.add(jTF_nomediscalt_disc);
    jTF_nomediscalt_disc.setBounds(230, 300, 660, 30);

    jLabel2_disc.setFont(new java.awt.Font("Tahoma", 0, 14)); // NOI18N
    jLabel2_disc.setBorder(javax.swing.BorderFactory.createTitledBorder(javax.swing.BorderFactory.createMatteBorder(2, 2, 2, 2, new java.awt.Color(255, 255, 255)), "Novo", javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION, javax.swing.border.TitledBorder.DEFAULT_POSITION, new java.awt.Font("Adobe Caslon Pro", 0, 14), new java.awt.Color(0, 0, 0))); // NOI18N
    jPanel4.add(jLabel2_disc);
    jLabel2_disc.setBounds(130, 260, 790, 220);

    jPanel4.setBounds(0, 0, 1010, 900);
    jDesktopPane3.add(jPanel4, javax.swing.JLayeredPane.DEFAULT_LAYER);

    jPanel_disciplina.add(jDesktopPane3);
    jDesktopPane3.setBounds(10, 10, 980, 590);

    jPanel1.add(jPanel_disciplina);
    jPanel_disciplina.setBounds(210, 10, 990, 620);

    javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
    getContentPane().setLayout(layout);
    layout.setHorizontalGroup(
        layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
        .addGap(0, 1165, Short.MAX_VALUE)
        .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addComponent(jPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, 1165, Short.MAX_VALUE))
    );
    layout.setVerticalGroup(
        layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
        .addGap(0, 641, Short.MAX_VALUE)
        .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addComponent(jPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, 641, Short.MAX_VALUE))
    );

    java.awt.Dimension screenSize = java.awt.Toolkit.getDefaultToolkit().getScreenSize();
    setBounds((screenSize.width-1181)/2, (screenSize.height-679)/2, 1181, 679);
    }// </editor-fold>//GEN-END:initComponents

    private void jRB_editar_cursoItemStateChanged(java.awt.event.ItemEvent evt) {//GEN-FIRST:event_jRB_editar_cursoItemStateChanged
        if (jRB_editar_curso.isSelected()) {
            if (VerificaBD_curso()) {
                DesabilitaAdicionar_curso();
                DesabilitaDeletar_curso();
                escolha = jRB_editar_curso.getText();
                ChamaEscolha_curso(escolha);
                InicializaDadosEditar_curso();
            } else {
                DesabilitaAdicionar_curso();
                DesabilitaDeletar_curso();
                JOptionPane.showMessageDialog(null, "Não ha dados a serem editados!");
                buttonGroup1.clearSelection();
            }
        }
    }//GEN-LAST:event_jRB_editar_cursoItemStateChanged

    private void jRB_adicionar_cursoItemStateChanged(java.awt.event.ItemEvent evt) {//GEN-FIRST:event_jRB_adicionar_cursoItemStateChanged
        DesabilitaDeletar_curso();
        DesabilitaEditar_curso();
        escolha = jRB_adicionar_curso.getText();
        ChamaEscolha_curso(escolha);
    }//GEN-LAST:event_jRB_adicionar_cursoItemStateChanged

    private void jRB_deletar_cursoItemStateChanged(java.awt.event.ItemEvent evt) {//GEN-FIRST:event_jRB_deletar_cursoItemStateChanged
        if (jRB_deletar_curso.isSelected()) {
            if (VerificaBD_curso()) {
                DesabilitaAdicionar_curso();
                DesabilitaEditar_curso();
                escolha = jRB_deletar_curso.getText();
                ChamaEscolha_curso(escolha);
                InicializaDadosDeletar_curso();
            } else {
                DesabilitaAdicionar_curso();
                DesabilitaEditar_curso();
                JOptionPane.showMessageDialog(null, "Não ha dados a serem excluidos!");
                buttonGroup1.clearSelection();
            }
        }
    }//GEN-LAST:event_jRB_deletar_cursoItemStateChanged

    private void jTF_descricaonovo_cursoKeyReleased(java.awt.event.KeyEvent evt) {//GEN-FIRST:event_jTF_descricaonovo_cursoKeyReleased
        String inicial = jTF_descricaonovo_curso.getText();
        String maiuscula;
        maiuscula = inicial.toUpperCase();
        jTF_descricaonovo_curso.setText(maiuscula);
    }//GEN-LAST:event_jTF_descricaonovo_cursoKeyReleased

    private void jTF_descricao_cursoKeyReleased(java.awt.event.KeyEvent evt) {//GEN-FIRST:event_jTF_descricao_cursoKeyReleased
        String inicial = jTF_descricao_curso.getText();
        String maiuscula;
        maiuscula = inicial.toUpperCase();
        jTF_descricao_curso.setText(maiuscula);
    }//GEN-LAST:event_jTF_descricao_cursoKeyReleased

    private void jCB_curso1_cursoActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jCB_curso1_cursoActionPerformed
        AtualizaDadosDeletar_curso();
    }//GEN-LAST:event_jCB_curso1_cursoActionPerformed

    private void jCB_curso_cursoActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jCB_curso_cursoActionPerformed
        AtualizaDadosEditar_curso();
    }//GEN-LAST:event_jCB_curso_cursoActionPerformed

    private void buton_deletar_cursoActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_buton_deletar_cursoActionPerformed
        int resp = JOptionPane.showConfirmDialog(this, "Deseja realmente excluir este curso?",
                "Confirmação", JOptionPane.YES_NO_OPTION);

        if (resp == JOptionPane.YES_NO_OPTION) {
            String a12 = jCB_curso1_curso.getSelectedItem().toString();
            String b12 = jCB_descricao1_curso.getSelectedItem().toString();
            curso.setNome(jCB_curso1_curso.getSelectedItem().toString());
            curso.setDescrição(jCB_descricao1_curso.getSelectedItem().toString());
            int id_c = cursomet.Buscar_ID_Curso(a12);
            int id_desc = cursomet.Buscar_ID_Descricao(id_c, b12, 0);
            curso.setId(id_c);
            curso.setId_descricao(id_desc);
            try {
                cursomet.DeletarCurso(curso);
            } catch (SQLException ex) {
                Logger.getLogger(Menu3.class.getName()).log(Level.SEVERE, null, ex);
            }
            JOptionPane.showMessageDialog(null, "Deletado com sucesso!");
        }
        if (VerificaBD_curso()) {
            InicializaDadosDeletar_curso();
        } else {
            DesabilitaDeletar_curso();
            buttonGroup1.clearSelection();

        }

    }//GEN-LAST:event_buton_deletar_cursoActionPerformed

    private void buton_editar_cursoActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_buton_editar_cursoActionPerformed
        if (VerificaDadosCorretosEDT_curso()) {
            if ("A".equals(jTF_descricaonovo_curso.getText()) || "B".equals(jTF_descricaonovo_curso.getText()) || "C".equals(jTF_descricaonovo_curso.getText()) || "D".equals(jTF_descricaonovo_curso.getText()) || "E".equals(jTF_descricaonovo_curso.getText()) || "F".equals(jTF_descricaonovo_curso.getText()) || "G".equals(jTF_descricaonovo_curso.getText()) || "H".equals(jTF_descricaonovo_curso.getText())) {
                String s_curso = jCB_curso_curso.getSelectedItem().toString();
                String s_desc = jCB_descricao_curso.getSelectedItem().toString();
                int ids = cursomet.Buscar_ID_Curso(s_curso);
                int id_desc = cursomet.Buscar_ID_Descricao(ids, s_desc, 0);
                curso.setDesc_ant(s_desc);
                curso.setNome_ant(s_curso);
                curso.setNome(jTF_cursonovo_curso.getText());
                curso.setDescrição(jTF_descricaonovo_curso.getText());
                curso.setId(ids);
                curso.setId_descricao(id_desc);
                if (cursomet.BuscaCursoseDescriçoesiguais(curso)) {
                    try {
                        cursomet.Alterar_Curso(curso);
                    } catch (SQLException ex) {
                        Logger.getLogger(Menu3.class.getName()).log(Level.SEVERE, null, ex);
                    }
                    JOptionPane.showMessageDialog(null, "Editado com sucesso!");
                } else {
                    JOptionPane.showMessageDialog(null, "Curso ja existente.");
                }
                InicializaDadosEditar_curso();
                jTF_cursonovo_curso.setText("");
                jTF_descricaonovo_curso.setText("");

            } else {
                JOptionPane.showMessageDialog(null, "Dados Incorretos!");
            }
        } else {
            JOptionPane.showMessageDialog(null, "Dados não inseridos!");
        }
    }//GEN-LAST:event_buton_editar_cursoActionPerformed

    private void buton_adicionar_cursoActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_buton_adicionar_cursoActionPerformed
        if (VerificaDadosCorretosADD_curso()) {
            curso.setNome(jTF_nomecurso_curso.getText());
            curso.setDescrição(jTF_descricao_curso.getText());
            if (cursomet.BuscaCursoseDescriçoesiguais(curso)) {
                try {
                    cursomet.AdicionaCurso(curso);
                } catch (SQLException ex) {
                    Logger.getLogger(Menu3.class.getName()).log(Level.SEVERE, null, ex);
                }
                JOptionPane.showMessageDialog(null, "Adicionado com sucesso!");
                limpaDadosAdicionar_curso();
            } else {
                JOptionPane.showMessageDialog(null, "Este curso já existe!");
            }
        } else {
            JOptionPane.showMessageDialog(null, "Dados Incorretos");
        }
    }//GEN-LAST:event_buton_adicionar_cursoActionPerformed

    private void jB_cursoActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jB_cursoActionPerformed
        jDialog1.setVisible(false);
        jDialog2.setVisible(false);
        jDialog3.setVisible(false);
        jDialog4.setVisible(false);
        jPanel_disciplina.setVisible(false);
          jPanel_serie.setVisible(false);
          jPanel_hora_aula.setVisible(false);
          jPanel_prof.setVisible(false);
          jD_addestagio.setVisible(false);
          jD_aula10.setVisible(false);
          jD_esc_rel.setVisible(false);
          jD_grade_curricular.setVisible(false);
          jD_salva.setVisible(false);
          jD_sn.setVisible(false);
        DesabilitaAdicionar_curso();
        DesabilitaDeletar_curso();
        DesabilitaEditar_curso();
        jPanel_curso.setVisible(true);
    }//GEN-LAST:event_jB_cursoActionPerformed

    private void buton_deletar_discActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_buton_deletar_discActionPerformed
        if (jTTabela_Disc2.getSelectedRow() != -1) {
            int resp = JOptionPane.showConfirmDialog(this, "Deseja realmente excluir esta disciplina?",
                    "Confirmação", JOptionPane.YES_NO_OPTION);

            if (resp == JOptionPane.YES_NO_OPTION) {
                try {
                    discmet.ExcluiDisciplina(Disc2.get(jTTabela_Disc2.getSelectedRow()));
                } catch (SQLException ex) {
                    Logger.getLogger(Menu3.class.getName()).log(Level.SEVERE, null, ex);
                }

                JOptionPane.showMessageDialog(null, "Excluido com sucesso");
                limpaDadosALTDEL_disc();
                try {
                    Disc2 = discmet.BuscarDisciplinas(jTF_pesquisar_disc.getText() + "%");
                } catch (SQLException ex) {
                    Logger.getLogger(Menu3.class.getName()).log(Level.SEVERE, null, ex);
                }

                mostraPesquisa2_disc(Disc2);
            }
        } else {
            JOptionPane.showMessageDialog(null, "Nada selecionado");
        }
    }//GEN-LAST:event_buton_deletar_discActionPerformed

    private void buton_editar_discActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_buton_editar_discActionPerformed
        if (VerificaDadosCorretosALTDEL_disc()) {
            String a123;

            disciplina.setNome(jTF_nomediscalt_disc.getText());
            disciplina.setId_disc(id_disciplina);
            if (jRB_profissionalalt_disc.isSelected()) {
                a123 = jRB_profissionalalt_disc.getText();

                disciplina.setId_curso(cursomet.Buscar_ID_Curso(jCB_cursoalt_disc.getSelectedItem().toString()));

            } else {
                a123 = jRB_regularalt_disc.getText();
            }
            disciplina.setEixo(a123);
            try {
                discmet.AlteraDisciplina(disciplina);
            } catch (SQLException ex) {
                Logger.getLogger(Menu3.class.getName()).log(Level.SEVERE, null, ex);
            }
            JOptionPane.showMessageDialog(null, "Alterado com sucesso");
            limpaDadosALTDEL_disc();
        } else {
            JOptionPane.showMessageDialog(null, "Dados Incorretos");
        }
    }//GEN-LAST:event_buton_editar_discActionPerformed

    private void buton_adicionar_discActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_buton_adicionar_discActionPerformed
        if (VerificaDadosCorretosADD_disc()) {
            if (jRB_regular_disc.isSelected()) {
                disciplina.setNome(jTF_nomedisc_disc.getText());
                disciplina.setEixo(jRB_regular_disc.getText());
                if (discmet.BuscaDisciplinaRegseiguais(disciplina)) {
                    try {
                        discmet.AdicionaDisciplina(disciplina, curso);
                    } catch (SQLException ex) {
                        Logger.getLogger(Menu3.class.getName()).log(Level.SEVERE, null, ex);
                    }
                    JOptionPane.showMessageDialog(null, "Adicionado com sucesso!");
                    limpaDadosAdicionar_disc();
                } else {
                    JOptionPane.showMessageDialog(null, "Esta disciplina já existe!");
                }
            } else {
                disciplina.setNome(jTF_nomedisc_disc.getText());
                disciplina.setEixo(jRB_profissional_disc.getText());
                curso.setId_curso(cursomet.Buscar_ID_Curso(jCB_curso_disc.getSelectedItem().toString()));

                System.out.println("id_curso: " + curso.getId_curso() + " id_descricao: " + curso.getId_descricao());
                if (discmet.BuscaDisciplinaProfseiguais(disciplina, curso)) {
                    try {
                        discmet.AdicionaDisciplina(disciplina, curso);
                    } catch (SQLException ex) {
                        Logger.getLogger(Menu3.class.getName()).log(Level.SEVERE, null, ex);
                    }
                    JOptionPane.showMessageDialog(null, "Adicionado com sucesso!");
                    limpaDadosAdicionar_disc();
                } else {
                    JOptionPane.showMessageDialog(null, "Esta disciplina já existe!");
                }

            }
        } else {
            JOptionPane.showMessageDialog(null, "Dados Incorretos");
        }
    }//GEN-LAST:event_buton_adicionar_discActionPerformed

    private void jRB_edt_del_discItemStateChanged(java.awt.event.ItemEvent evt) {//GEN-FIRST:event_jRB_edt_del_discItemStateChanged
        if (jRB_edt_del_disc.isSelected()) {
            if (VerificaBD_disc()) {
                DesabilitaAdicionar_disc();
                DesabilitaVisualizar_disc();
                escolha = jRB_edt_del_disc.getText();
                ChamaEscolha_disc(escolha);
                InicializaDadosEdlDel_disc();

            } else {
                DesabilitaAdicionar_disc();
                DesabilitaDelEdt_disc();
                JOptionPane.showMessageDialog(null, "Não ha disciplinas a serem editadas nem deletadas!");
                buttonGroup1.clearSelection();

            }
        }
    }//GEN-LAST:event_jRB_edt_del_discItemStateChanged

    private void jRB_adicionar_discItemStateChanged(java.awt.event.ItemEvent evt) {//GEN-FIRST:event_jRB_adicionar_discItemStateChanged
        DesabilitaDelEdt_disc();
        DesabilitaVisualizar_disc();
        escolha = jRB_adicionar_disc.getText();
        ChamaEscolha_disc(escolha);
    }//GEN-LAST:event_jRB_adicionar_discItemStateChanged

    private void jRB_visualizar_discItemStateChanged(java.awt.event.ItemEvent evt) {//GEN-FIRST:event_jRB_visualizar_discItemStateChanged
        if (jRB_visualizar_disc.isSelected()) {
            if (VerificaBD_disc() && VerificaBD2_disc()) {
                DesabilitaAdicionar_disc();
                DesabilitaDelEdt_disc();
                escolha = jRB_visualizar_disc.getText();
                ChamaEscolha_disc(escolha);
                InicializaDadosProfissionais2_disc();
            } else {
                JOptionPane.showMessageDialog(null, "Não ha disciplinas profissionais a serem visualizadas!");
                buttonGroup1.clearSelection();
                DesabilitaAdicionar_disc();
                DesabilitaDelEdt_disc();
            }
        }
    }//GEN-LAST:event_jRB_visualizar_discItemStateChanged

    private void jRB_visualizar_discActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jRB_visualizar_discActionPerformed
        // TODO add your handling code here:
    }//GEN-LAST:event_jRB_visualizar_discActionPerformed

    private void jL_ok_discActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jL_ok_discActionPerformed
        if (VerificaDiscipinaBD_disc(jCB_curso1_disc.getSelectedItem().toString())) {
            try {

                Disc = discmet.BuscarDisciplinaCurso(jCB_curso1_disc.getSelectedItem().toString());
            } catch (SQLException ex) {
                Logger.getLogger(Menu3.class.getName()).log(Level.SEVERE, null, ex);
            }
            mostraPesquisa_disc(Disc);
        } else {
            while (tmDisc.getRowCount() > 0) {
                tmDisc.removeRow(0);
            }
            JOptionPane.showMessageDialog(null, "Não há disciplinas neste curso!");
        }
    }//GEN-LAST:event_jL_ok_discActionPerformed

    private void jRB_regular_discItemStateChanged(java.awt.event.ItemEvent evt) {//GEN-FIRST:event_jRB_regular_discItemStateChanged

   }//GEN-LAST:event_jRB_regular_discItemStateChanged

    private void jRB_profissional_discItemStateChanged(java.awt.event.ItemEvent evt) {//GEN-FIRST:event_jRB_profissional_discItemStateChanged
        if (jRB_profissional_disc.isSelected()) {
            if (VerificaBD2_disc()) {
                jl_curso_disc.setVisible(true);

                jCB_curso_disc.setVisible(true);

                InicializaDadosProfissionais_disc();

            } else {
                JOptionPane.showMessageDialog(null, "Não ha cursos a serem selecionados!");
                buttonGroup2.clearSelection();
            }
        } else {

            jl_curso_disc.setVisible(false);

            jCB_curso_disc.setVisible(false);

        }
    }//GEN-LAST:event_jRB_profissional_discItemStateChanged

    private void jTF_pesquisar_discKeyReleased(java.awt.event.KeyEvent evt) {//GEN-FIRST:event_jTF_pesquisar_discKeyReleased
        InicializaDadosEdlDel_disc();
    }//GEN-LAST:event_jTF_pesquisar_discKeyReleased

    private void jRB_profissionalalt_discItemStateChanged(java.awt.event.ItemEvent evt) {//GEN-FIRST:event_jRB_profissionalalt_discItemStateChanged
        if (jRB_profissionalalt_disc.isSelected()) {
            if (Verificasehacursos_disc()) {
                jCB_cursoalt_disc.setVisible(true);

                jl_cursoalt_disc.setVisible(true);

                String[] descrição;
                String[] cursos = cursomet.Buscar_Nome_Cursos();
                jCB_cursoalt_disc.setModel(new javax.swing.DefaultComboBoxModel(cursos));

//        listaC=cursomet.BuscarTodasDescriçoes();
//        descrição = new String[listaC.size()];
//        for(int i = 0;listaC.size()>i;i++){
//        curso = listaC.get(i);
//        descrição[i] = curso.getDescrição(); 
//        }
//        jCB_descricaoalt.setModel(new javax.swing.DefaultComboBoxModel(descrição));

            } else {
                JOptionPane.showMessageDialog(null, "Não ha cursos adicionados!");
            }
        }
    }//GEN-LAST:event_jRB_profissionalalt_discItemStateChanged

    private void jRB_regularalt_discItemStateChanged(java.awt.event.ItemEvent evt) {//GEN-FIRST:event_jRB_regularalt_discItemStateChanged
        jCB_cursoalt_disc.setVisible(false);

        jl_cursoalt_disc.setVisible(false);

    }//GEN-LAST:event_jRB_regularalt_discItemStateChanged

    private void jB_disciplinaActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jB_disciplinaActionPerformed
        jPanel_curso.setVisible(false);
          
          jDialog1.setVisible(false);
        jDialog2.setVisible(false);
        jDialog3.setVisible(false);
        jDialog4.setVisible(false);
        jPanel_serie.setVisible(false);
          jPanel_hora_aula.setVisible(false);
          jPanel_prof.setVisible(false);
          jD_addestagio.setVisible(false);
          jD_aula10.setVisible(false);
          jD_esc_rel.setVisible(false);
          jD_grade_curricular.setVisible(false);
          jD_salva.setVisible(false);
          jD_sn.setVisible(false);     
        DesabilitaAdicionar_disc();
        DesabilitaDelEdt_disc();
        DesabilitaVisualizar_disc();
        jPanel_disciplina.setVisible(true);
    }//GEN-LAST:event_jB_disciplinaActionPerformed

    private void jB_layoutActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jB_layoutActionPerformed
jDialog1.setVisible(false);
        jDialog2.setVisible(false);
        jDialog3.setVisible(false);
        jPanel_curso.setVisible(false);
          jPanel_disciplina.setVisible(false);
          jPanel_serie.setVisible(false);
          jPanel_hora_aula.setVisible(false);
          jPanel_prof.setVisible(false);
          jD_addestagio.setVisible(false);
          jD_aula10.setVisible(false);
          jD_esc_rel.setVisible(false);
          jD_grade_curricular.setVisible(false);
          jD_salva.setVisible(false);
          jD_sn.setVisible(false);     
        java.awt.EventQueue.invokeLater(new Runnable() {

            @Override
            public void run() {
                new Layout().setVisible(true);
            }
        });
         dispose();
    }//GEN-LAST:event_jB_layoutActionPerformed

    private void jRB_adicionar_serieItemStateChanged(java.awt.event.ItemEvent evt) {//GEN-FIRST:event_jRB_adicionar_serieItemStateChanged
        DesabilitaDeletar_serie();
        escolha = jRB_adicionar_serie.getText();
        ChamaEscolha_serie(escolha);
        InicializaDadosADD_serie();
    }//GEN-LAST:event_jRB_adicionar_serieItemStateChanged

    private void jRB_deletar_serieItemStateChanged(java.awt.event.ItemEvent evt) {//GEN-FIRST:event_jRB_deletar_serieItemStateChanged
        if (jRB_deletar_serie.isSelected()) {
            if (VerificaseVazio_serie()) {
                DesabilitaAdicionar_serie();
                escolha = jRB_deletar_serie.getText();
                ChamaEscolha_serie(escolha);
                try {
                    listaS = seriemet.Buscar("%");
                } catch (SQLException ex) {
                    Logger.getLogger(Menu3.class.getName()).log(Level.SEVERE, null, ex);
                }
                mostraPesquisa_serie(listaS);
            } else {
                JOptionPane.showMessageDialog(null, "Não há series a serem deletadas!");
                DesabilitaAdicionar_serie();
                buttonGroup1.clearSelection();
            }
        }
    }//GEN-LAST:event_jRB_deletar_serieItemStateChanged

    private void jCB_curso_serieActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jCB_curso_serieActionPerformed
        AtualizaDadosAdicionar_serie();
    }//GEN-LAST:event_jCB_curso_serieActionPerformed

    private void buton_adicionar_serieActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_buton_adicionar_serieActionPerformed
        if (VerificaDadosCorretos_serie()) {
            String a6 = null;
            curso.setNome(jCB_curso_serie.getSelectedItem().toString());
            curso.setDescrição(jCB_descricao_serie.getSelectedItem().toString());
            if (jRB_1_serie.isSelected()) {
                a6 = jRB_1_serie.getText();
            }
            if (jRB_2_serie.isSelected()) {
                a6 = jRB_2_serie.getText();
            }
            if (jRB_3_serie.isSelected()) {
                a6 = jRB_3_serie.getText();
            }
            serie.setNome(a6);
            serie.setId_curso(cursomet.Buscar_ID_Curso(jCB_curso_serie.getSelectedItem().toString()));
            serie.setId_turma(cursomet.Buscar_ID_Descricao(curso.getId_curso(), jCB_descricao_serie.getSelectedItem().toString(), 0));
            if (seriemet.VerificaBD(curso, serie)) {
                try {
                    seriemet.AdicionaSerie(serie);
                } catch (SQLException ex) {
                    Logger.getLogger(Menu3.class.getName()).log(Level.SEVERE, null, ex);
                }
                JOptionPane.showMessageDialog(null, "Adicionado com sucesso!");
            } else {
                JOptionPane.showMessageDialog(null, "Esta serie ja existe!");
            }
        } else {
            JOptionPane.showMessageDialog(null, "Dados Incorretos");
        }
    }//GEN-LAST:event_buton_adicionar_serieActionPerformed

    private void buton_deletar_serieActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_buton_deletar_serieActionPerformed
        if (jTTabela_Serie.getSelectedRow() != -1) {
            int resp = JOptionPane.showConfirmDialog(this, "Deseja realmente excluir esta serie?",
                    "Confirmação", JOptionPane.YES_NO_OPTION);

            if (resp == JOptionPane.YES_NO_OPTION) {
                try {
                    curso.setNome(listaS.get(jTTabela_Serie.getSelectedRow()).getCurso());
                    curso.setDescrição(listaS.get(jTTabela_Serie.getSelectedRow()).getTurma());
                    seriemet.Excluir(listaS.get(jTTabela_Serie.getSelectedRow()).getId(), curso);
                } catch (SQLException ex) {
                    Logger.getLogger(Menu3.class.getName()).log(Level.SEVERE, null, ex);
                }
                JOptionPane.showMessageDialog(null, "Excluído com sucesso!");
                try {
                    listaS = seriemet.Buscar("%");
                } catch (SQLException ex) {
                    Logger.getLogger(Menu3.class.getName()).log(Level.SEVERE, null, ex);
                }
                mostraPesquisa_serie(listaS);
            }
        } else {
            JOptionPane.showMessageDialog(null, "Nada selecionado");
        }
    }//GEN-LAST:event_buton_deletar_serieActionPerformed

    private void jB_serieActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jB_serieActionPerformed
      jPanel_curso.setVisible(false);
          jPanel_disciplina.setVisible(false);
          jDialog1.setVisible(false);
        jDialog2.setVisible(false);
        jDialog3.setVisible(false);
        jDialog4.setVisible(false);
          jPanel_hora_aula.setVisible(false);
          jPanel_prof.setVisible(false);
          jD_addestagio.setVisible(false);
          jD_aula10.setVisible(false);
          jD_esc_rel.setVisible(false);
          jD_grade_curricular.setVisible(false);
          jD_salva.setVisible(false);
          jD_sn.setVisible(false);     
       DesabilitaAdicionar_serie();
        DesabilitaDeletar_serie();
        jPanel_serie.setVisible(true);
    }//GEN-LAST:event_jB_serieActionPerformed

    private void jL_deletar_haActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jL_deletar_haActionPerformed
        if (!"".equals(jl_serie_ha.getText())) {
            int resp = JOptionPane.showConfirmDialog(this, "Deseja realmente excluir este dado?",
                    "Confirmação", JOptionPane.YES_NO_OPTION);

            if (resp == JOptionPane.YES_NO_OPTION) {

                HorasAulaMet dao = new HorasAulaMet();
                try {
                    dao.Excluir(id);
                } catch (SQLException ex) {
                    Logger.getLogger(Menu3.class.getName()).log(Level.SEVERE, null, ex);
                }
                try {
                    BuscaDadosTabela_ha();
                } catch (SQLException ex) {
                    Logger.getLogger(Menu3.class.getName()).log(Level.SEVERE, null, ex);
                }

                limpaDados_ha();
                JTF_Pesquisar2_ha.setText("");
                JOptionPane.showMessageDialog(null, "Excluído com sucesso!");
            }
        } else {
            JOptionPane.showMessageDialog(null, "Nada selecionado.");
        }
    }//GEN-LAST:event_jL_deletar_haActionPerformed

    private void jL_adicionar_haActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jL_adicionar_haActionPerformed
        if (!"".equals(jTF_horaaula_ha.getText())) {
            int HAs = Integer.parseInt(jTF_horaaula_ha.getText());
            serie.setNome(jCB_ano_ha.getSelectedItem().toString());
            serie.setTurma(jCB_descricao_ha.getSelectedItem().toString());
            professor.setNome(CB_Professor_ha.getSelectedItem().toString());
            disciplina.setNome(jCB_disciplina_ha.getSelectedItem().toString());
            int id_serie = seriemet.BuscarID(serie);

            int id_prof = profmet.BuscaId(professor);

            int id_disc = discmet.BuscaIDDisciplina(disciplina);
            try {
                hamet.Adicionar(id_serie, id_prof, id_disc, HAs);
            } catch (SQLException ex) {
                Logger.getLogger(Menu3.class.getName()).log(Level.SEVERE, null, ex);
            }
            JOptionPane.showMessageDialog(null, "Adicionado com sucesso!");
        } else {
            JOptionPane.showMessageDialog(null, "Campo vazio!");

        }
    }//GEN-LAST:event_jL_adicionar_haActionPerformed

    private void jL_editar_haActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jL_editar_haActionPerformed
        int HAs = Integer.parseInt(jTF_horaaula_ha.getText());
        serie.setNome(jCB_ano_ha.getSelectedItem().toString());
        serie.setTurma(jCB_descricao_ha.getSelectedItem().toString());
        professor.setNome(CB_Professor_ha.getSelectedItem().toString());
        disciplina.setNome(jCB_disciplina_ha.getSelectedItem().toString());

        int id_serie = seriemet.BuscarID(serie);
        int id_prof = profmet.BuscaId(professor);
        int id_disc = discmet.BuscaIDDisciplina(disciplina);
        try {
            hamet.EditaHA(id_serie, id_prof, id_disc, HAs);
        } catch (SQLException ex) {
            Logger.getLogger(Menu3.class.getName()).log(Level.SEVERE, null, ex);
        }
        JOptionPane.showMessageDialog(null, "Editado com sucesso!");
    }//GEN-LAST:event_jL_editar_haActionPerformed

    private void jLabel3_haActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jLabel3_haActionPerformed
        serie.setNome(jCB_ano_ha.getSelectedItem().toString());
        serie.setTurma(jCB_descricao_ha.getSelectedItem().toString());
        professor.setNome(CB_Professor_ha.getSelectedItem().toString());
        disciplina.setNome(jCB_disciplina_ha.getSelectedItem().toString());

        int HAs = hamet.BuscarHoraAulaPelaDisciplina(serie, professor, disciplina);

        if (HAs == 0) {
            jl_horaaula_ha.setVisible(true);
            jTF_horaaula_ha.setVisible(true);
            jL_adicionar_ha.setVisible(true);
            jL_editar_ha.setVisible(false);
            jTF_horaaula_ha.setText("");
        } else {
            jl_horaaula_ha.setVisible(true);
            jL_adicionar_ha.setVisible(false);
            jTF_horaaula_ha.setVisible(true);
            jL_editar_ha.setVisible(true);
            jTF_horaaula_ha.setText(String.valueOf(HAs));
        }
    }//GEN-LAST:event_jLabel3_haActionPerformed

    private void jLabel1_haActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jLabel1_haActionPerformed
        professor.setNome(CB_Professor_ha.getSelectedItem().toString());
        try {
            listaD = profdiscmet.BuscarDiasciplinasdoProfessor(professor);
        } catch (SQLException ex) {
            Logger.getLogger(Menu3.class.getName()).log(Level.SEVERE, null, ex);
        }
        if (listaD.isEmpty()) {
            JOptionPane.showMessageDialog(null, "Não ha disciplinas cadastradas com este professor!");
        } else {
            jLabel3_ha.setVisible(true);
            jCB_disciplina_ha.setVisible(true);
            jl_disciplina_ha.setVisible(true);
            String[] disc = new String[listaD.size()];
            for (int i = 0; listaD.size() > i; i++) {
                disciplina = listaD.get(i);
                disc[i] = disciplina.getNome();
            }
            jCB_disciplina_ha.setModel(new javax.swing.DefaultComboBoxModel(disc));

        }
    }//GEN-LAST:event_jLabel1_haActionPerformed

    private void jLabel2_haActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jLabel2_haActionPerformed

        serie.setNome(jCB_ano_ha.getSelectedItem().toString());

        serie.setTurma(jCB_descricao_ha.getSelectedItem().toString());


        try {
            listaP = profmet.BuscarProfPorTurma(serie);
        } catch (SQLException ex) {
            Logger.getLogger(Menu3.class.getName()).log(Level.SEVERE, null, ex);
        }
        if (listaP.isEmpty()) {
            JOptionPane.showMessageDialog(null, "Não ha professores cadastrados nesta turma!");
        } else {
            jLabel1_ha.setVisible(true);
            jl_nome_ha.setVisible(true);
            CB_Professor_ha.setVisible(true);
            String[] prof = new String[listaP.size()];
            for (int i = 0; listaP.size() > i; i++) {
                professor = listaP.get(i);
                prof[i] = professor.getNome();
            }
            CB_Professor_ha.setModel(new javax.swing.DefaultComboBoxModel(prof));
        }

    }//GEN-LAST:event_jLabel2_haActionPerformed

    private void jLabel4_haActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jLabel4_haActionPerformed
        if (buttonGroup3.getSelection() == null || jCB_descricao1_ha.getModel().getSelectedItem() == null) {
            JOptionPane.showMessageDialog(rootPane, "Selecione uma série e uma turma");
        } else {
            String serie6 = null, turma;
            if (jRB_1_ha.isSelected()) {
                serie6 = jRB_1_ha.getText();
            } else if (jRB_2_ha.isSelected()) {
                serie6 = jRB_2_ha.getText();
            } else if (jRB_3_ha.isSelected()) {
                serie6 = jRB_3_ha.getText();
            }
            turma = jCB_descricao1_ha.getSelectedItem().toString();
            try {
                listaP = hamet.BuscaHAporTurma(serie6, turma);
            } catch (SQLException ex) {
                Logger.getLogger(Menu3.class.getName()).log(Level.SEVERE, null, ex);
            }
            jScrollPane3.setVisible(true);
            jTTabela_HA2.setVisible(true);
            jl_Totalha_ha.setVisible(true);
            jTF_totalHA_ha.setVisible(true);
            mostraPesquisa2_ha(listaP);
            int quantha = hamet.BuscaQuantHA(serie6, turma);
            jTF_totalHA_ha.setText(String.valueOf(quantha));
        }
    }//GEN-LAST:event_jLabel4_haActionPerformed

    private void jRB_adicionar_haItemStateChanged(java.awt.event.ItemEvent evt) {//GEN-FIRST:event_jRB_adicionar_haItemStateChanged
        if (jRB_adicionar_ha.isSelected()) {
            if (Verificasehaseie_ha()) {
                DesabilitaVISDEL_ha();
                DesabilitaVis_ha();
                escolha = jRB_adicionar_ha.getText();
                ChamaEscolha_ha(escolha);
                try {
                    InicializaDadosADDALT_ha();
                } catch (SQLException ex) {
                    Logger.getLogger(Menu3.class.getName()).log(Level.SEVERE, null, ex);
                }
            } else {
                JOptionPane.showMessageDialog(null, "Não ha series adicionadas!");
            }
        }
    }//GEN-LAST:event_jRB_adicionar_haItemStateChanged

    private void jRB_deletar_haItemStateChanged(java.awt.event.ItemEvent evt) {//GEN-FIRST:event_jRB_deletar_haItemStateChanged
        if (jRB_deletar_ha.isSelected()) {
            if (VerificaseHA_ha()) {
                DesabilitaADDALT_ha();
                DesabilitaVis_ha();
                escolha = jRB_deletar_ha.getText();
                ChamaEscolha_ha(escolha);
                try {
                    BuscaDadosTabela_ha();
                } catch (SQLException ex) {
                    Logger.getLogger(Menu3.class.getName()).log(Level.SEVERE, null, ex);
                }
            } else {
                DesabilitaADDALT_ha();
                JOptionPane.showMessageDialog(null, "Não ha dados cadastrados!");
            }
        }
    }//GEN-LAST:event_jRB_deletar_haItemStateChanged

    private void jRB_visualizar_haItemStateChanged(java.awt.event.ItemEvent evt) {//GEN-FIRST:event_jRB_visualizar_haItemStateChanged
        if (jRB_visualizar_ha.isSelected()) {
            if (VerificaseHA_ha()) {
                DesabilitaADDALT_ha();
                DesabilitaVISDEL_ha();
                escolha = jRB_visualizar_ha.getText();
                ChamaEscolha_ha(escolha);

            } else {
                DesabilitaADDALT_ha();
                JOptionPane.showMessageDialog(null, "Não ha dados cadastrados!");
            }
        }
    }//GEN-LAST:event_jRB_visualizar_haItemStateChanged

    private void jRB_1_haItemStateChanged(java.awt.event.ItemEvent evt) {//GEN-FIRST:event_jRB_1_haItemStateChanged
        if (jRB_1_ha.isSelected()) {
            String nome = jRB_1_ha.getText();
            listaC = cursomet.BuscarDescricaoporSerie(nome);
            if (!listaC.isEmpty()) {
                String[] descrição = new String[listaC.size()];
                for (int i = 0; listaC.size() > i; i++) {
                    curso = listaC.get(i);
                    descrição[i] = curso.getDescrição();
                }
                jCB_descricao1_ha.setModel(new javax.swing.DefaultComboBoxModel(descrição));
            }
        }
    }//GEN-LAST:event_jRB_1_haItemStateChanged

    private void jRB_2_haItemStateChanged(java.awt.event.ItemEvent evt) {//GEN-FIRST:event_jRB_2_haItemStateChanged
        if (jRB_2_ha.isSelected()) {
            String nome = jRB_2_ha.getText();
            listaC = cursomet.BuscarDescricaoporSerie(nome);
            if (!listaC.isEmpty()) {
                String[] descrição = new String[listaC.size()];
                for (int i = 0; listaC.size() > i; i++) {
                    curso = listaC.get(i);
                    descrição[i] = curso.getDescrição();
                }
                jCB_descricao1_ha.setModel(new javax.swing.DefaultComboBoxModel(descrição));
            }
        }
    }//GEN-LAST:event_jRB_2_haItemStateChanged

    private void jRB_3_haItemStateChanged(java.awt.event.ItemEvent evt) {//GEN-FIRST:event_jRB_3_haItemStateChanged
        if (jRB_3_ha.isSelected()) {
            String nome = jRB_3_ha.getText();
            listaC = cursomet.BuscarDescricaoporSerie(nome);
            if (!listaC.isEmpty()) {
                String[] descrição = new String[listaC.size()];
                for (int i = 0; listaC.size() > i; i++) {
                    curso = listaC.get(i);
                    descrição[i] = curso.getDescrição();
                }
                jCB_descricao1_ha.setModel(new javax.swing.DefaultComboBoxModel(descrição));
            }
        }
    }//GEN-LAST:event_jRB_3_haItemStateChanged

    private void jCB_ano_haActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jCB_ano_haActionPerformed
        String nome = jCB_ano_ha.getSelectedItem().toString();
        try {
            listaS = seriemet.Buscar(nome);
        } catch (SQLException ex) {
            Logger.getLogger(Menu3.class.getName()).log(Level.SEVERE, null, ex);
        }
        String[] descrição = new String[listaS.size()];
        for (int i = 0; listaS.size() > i; i++) {
            serie = listaS.get(i);
            descrição[i] = serie.getTurma();
        }
        jCB_descricao_ha.setModel(new javax.swing.DefaultComboBoxModel(descrição));
    }//GEN-LAST:event_jCB_ano_haActionPerformed

    private void RB_Professor_haItemStateChanged(java.awt.event.ItemEvent evt) {//GEN-FIRST:event_RB_Professor_haItemStateChanged
        pesquisa = RB_Professor_ha.getText();
    }//GEN-LAST:event_RB_Professor_haItemStateChanged

    private void RB_Materia_haItemStateChanged(java.awt.event.ItemEvent evt) {//GEN-FIRST:event_RB_Materia_haItemStateChanged
        pesquisa = RB_Materia_ha.getText();
    }//GEN-LAST:event_RB_Materia_haItemStateChanged

    private void JTF_Pesquisar2_haKeyReleased(java.awt.event.KeyEvent evt) {//GEN-FIRST:event_JTF_Pesquisar2_haKeyReleased
        if ("Professor".equals(pesquisa)) {
            try {
                BuscaDadosTabela_ha();
            } catch (SQLException ex) {
                Logger.getLogger(Menu3.class.getName()).log(Level.SEVERE, null, ex);
            }
        }
        if ("Disciplina".equals(pesquisa)) {
            try {
                PesquisarPorMateria_ha();
            } catch (SQLException ex) {
                Logger.getLogger(Menu3.class.getName()).log(Level.SEVERE, null, ex);
            }
        }
    }//GEN-LAST:event_JTF_Pesquisar2_haKeyReleased

    private void jL_deletar1_haActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jL_deletar1_haActionPerformed
        if( !"".equals(jl_serie_ha.getText())){
        int resp = JOptionPane.showConfirmDialog(this, "Deseja realmente excluir este dado?",
                "Confirmação", JOptionPane.YES_NO_OPTION);

        if (resp == JOptionPane.YES_NO_OPTION) {
        
        HorasAulaMet dao=new HorasAulaMet();
            try {
                dao.Excluir(id);
            } catch (SQLException ex) {
                Logger.getLogger(Menu3.class.getName()).log(Level.SEVERE, null, ex);
            }
            try {
                BuscaDadosTabela_ha();
            } catch (SQLException ex) {
                Logger.getLogger(Menu3.class.getName()).log(Level.SEVERE, null, ex);
            }
        
  limpaDados_ha();
    JTF_Pesquisar2_ha.setText("");
    JOptionPane.showMessageDialog(null, "Excluído com sucesso!");
        }
    }else{
        JOptionPane.showMessageDialog(null, "Nada selecionado.");
    }
    }//GEN-LAST:event_jL_deletar1_haActionPerformed

    private void jB_haActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jB_haActionPerformed
       jPanel_curso.setVisible(false);
          jPanel_disciplina.setVisible(false);
          jPanel_serie.setVisible(false);
          jDialog1.setVisible(false);
        jDialog2.setVisible(false);
        jDialog3.setVisible(false);
        jDialog4.setVisible(false);
          jPanel_prof.setVisible(false);
          jD_addestagio.setVisible(false);
          jD_aula10.setVisible(false);
          jD_esc_rel.setVisible(false);
          jD_grade_curricular.setVisible(false);
          jD_salva.setVisible(false);
          jD_sn.setVisible(false);     
        DesabilitaADDALT_ha();
        DesabilitaVISDEL_ha();
        DesabilitaVis_ha();
        jPanel_hora_aula.setVisible(true);
    }//GEN-LAST:event_jB_haActionPerformed

    private void jLabel1_sghMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_jLabel1_sghMouseClicked
       java.awt.EventQueue.invokeLater(new Runnable() {

            @Override
            public void run() {
                new Sobre2().setVisible(true);
            }
        });
    }//GEN-LAST:event_jLabel1_sghMouseClicked

    private void jButton_horarioActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton_horarioActionPerformed
       CursoMet cursomet = new CursoMet();
        if (VerificaDisponibilidadedosProf()) {
            if (cursomet.Buscar_Se_Ha_Curso()) {

                
                   java.awt.Dimension screenSize = java.awt.Toolkit.getDefaultToolkit().getScreenSize();
        jD_sn.setBounds((screenSize.width-449)/2, (screenSize.height-280)/2, 449, 280);
        jD_sn.setVisible(true);
        

                    jD_esc_rel.setVisible(false);
                    
            } else {
                JOptionPane.showMessageDialog(null, "Dados incompletos para geração");
            }
        }
    }//GEN-LAST:event_jButton_horarioActionPerformed

    private void jButton_gcActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton_gcActionPerformed
       CursoMet cursomet = new CursoMet();
        if (cursomet.Buscar_Se_Ha_Curso()) {
            AlocarCurso();
        java.awt.Dimension screenSize = java.awt.Toolkit.getDefaultToolkit().getScreenSize();
        jD_grade_curricular.setBounds((screenSize.width-690)/2, (screenSize.height-360)/2, 690, 360);
        jD_grade_curricular.setVisible(true);
        jD_esc_rel.setVisible(false);
             
        } else {
            JOptionPane.showMessageDialog(null, "Dados incompletos para geração");
        }
    }//GEN-LAST:event_jButton_gcActionPerformed

    private void jButton11ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton11ActionPerformed
      java.awt.Dimension screenSize = java.awt.Toolkit.getDefaultToolkit().getScreenSize();
        jD_salva.setBounds((screenSize.width - 625) / 2, (screenSize.height - 430) / 2, 625, 430);
        jD_salva.setVisible(true);
    }//GEN-LAST:event_jButton11ActionPerformed

    private void jFileChooser1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jFileChooser1ActionPerformed

        arquivo = jFileChooser1.getSelectedFile();
        jD_salva.setVisible(false);
        
        if(arquivo!=null){
        String adober;
        adober = String.valueOf(arquivo);
        File pasta = new File(adober+"/Relatorios");
            pasta.mkdir();
            adober=adober+"/Relatorios";
        System.out.println(adober);
        if (!adober.equals("null")) {
            try {
                Connection con = (Connection) CriaConexao.getConexao();

                HashMap parametros = new HashMap();

                CriaConexao Con = new CriaConexao();
                RelatorioMet obm = new RelatorioMet();
                File f = new File(adober + "/Grades Curriculares");
                f.delete();
                File dir2 = new File(adober + "/Grades Curriculares");
                dir2.mkdir();
                String adober2;
                adober2 = String.valueOf(dir2);
                if (jCheckBox1.isSelected()) {

                    nome_curso = jCheckBox1.getText();
                    parametros = (HashMap) obm.Met(nome_curso);
                    parametros.put("logo", getClass().getResourceAsStream("iconebarra.png"));
                    JasperPrint jp = null;
                    try {
                        jp = JasperFillManager.fillReport("./src/Relatorios/Grade2.jasper", parametros, con);
                    } catch (JRException ex) {
                        Logger.getLogger(Menu3.class.getName()).log(Level.SEVERE, null, ex);
                    }
                    try {
                        JasperExportManager.exportReportToPdfFile(jp, adober2 + "/" + nome_curso + ".pdf");
                    } catch (JRException ex) {
                        Logger.getLogger(Menu3.class.getName()).log(Level.SEVERE, null, ex);
                    }
                    System.out.println("salvou " + nome_curso);
                }
                if (jCheckBox2.isSelected()) {

                    nome_curso = jCheckBox2.getText();
                    parametros = (HashMap) obm.Met(nome_curso);
                    parametros.put("logo", getClass().getResourceAsStream("iconebarra.png"));
                    JasperPrint jp = null;
                    try {
                        jp = JasperFillManager.fillReport("./src/Relatorios/Grade2.jasper", parametros, con);
                    } catch (JRException ex) {
                        Logger.getLogger(Menu3.class.getName()).log(Level.SEVERE, null, ex);
                    }
                    try {
                        JasperExportManager.exportReportToPdfFile(jp, adober2 + "/" + nome_curso + ".pdf");
                    } catch (JRException ex) {
                        Logger.getLogger(Menu3.class.getName()).log(Level.SEVERE, null, ex);
                    }
                    System.out.println("salvou " + nome_curso);
                }
                if (jCheckBox3.isSelected()) {

                    nome_curso = jCheckBox3.getText();
                    parametros = (HashMap) obm.Met(nome_curso);
                    parametros.put("logo", getClass().getResourceAsStream("iconebarra.png"));
                    JasperPrint jp = null;
                    try {
                        jp = JasperFillManager.fillReport("./src/Relatorios/Grade2.jasper", parametros, con);
                    } catch (JRException ex) {
                        Logger.getLogger(Menu3.class.getName()).log(Level.SEVERE, null, ex);
                    }
                    try {
                        JasperExportManager.exportReportToPdfFile(jp, adober2 + "/" + nome_curso + ".pdf");
                    } catch (JRException ex) {
                        Logger.getLogger(Menu3.class.getName()).log(Level.SEVERE, null, ex);
                    }
                    System.out.println("salvou " + nome_curso);
                }
                if (jCheckBox4.isSelected()) {

                    nome_curso = jCheckBox4.getText();
                    parametros = (HashMap) obm.Met(nome_curso);
                    parametros.put("logo", getClass().getResourceAsStream("iconebarra.png"));
                    JasperPrint jp = null;
                    try {
                        jp = JasperFillManager.fillReport("./src/Relatorios/Grade2.jasper", parametros, con);
                    } catch (JRException ex) {
                        Logger.getLogger(Menu3.class.getName()).log(Level.SEVERE, null, ex);
                    }
                    try {
                        JasperExportManager.exportReportToPdfFile(jp, adober2 + "/" + nome_curso + ".pdf");
                    } catch (JRException ex) {
                        Logger.getLogger(Menu3.class.getName()).log(Level.SEVERE, null, ex);
                    }
                    System.out.println("salvou " + nome_curso);
                }
                if (jCheckBox5.isSelected()) {

                    nome_curso = jCheckBox5.getText();
                    parametros = (HashMap) obm.Met(nome_curso);
                    parametros.put("logo", getClass().getResourceAsStream("iconebarra.png"));
                    JasperPrint jp = null;
                    try {
                        jp = JasperFillManager.fillReport("./src/Relatorios/Grade2.jasper", parametros, con);
                    } catch (JRException ex) {
                        Logger.getLogger(Menu3.class.getName()).log(Level.SEVERE, null, ex);
                    }
                    try {
                        JasperExportManager.exportReportToPdfFile(jp, adober2 + "/" + nome_curso + ".pdf");
                    } catch (JRException ex) {
                        Logger.getLogger(Menu3.class.getName()).log(Level.SEVERE, null, ex);
                    }
                    System.out.println("salvou " + nome_curso);
                }
                if (jCheckBox6.isSelected()) {

                    nome_curso = jCheckBox6.getText();
                    parametros = (HashMap) obm.Met(nome_curso);
                    parametros.put("logo", getClass().getResourceAsStream("iconebarra.png"));
                    JasperPrint jp = null;
                    try {
                        jp = JasperFillManager.fillReport("./src/Relatorios/Grade2.jasper", parametros, con);
                    } catch (JRException ex) {
                        Logger.getLogger(Menu3.class.getName()).log(Level.SEVERE, null, ex);
                    }
                    try {
                        JasperExportManager.exportReportToPdfFile(jp, adober2 + "/" + nome_curso + ".pdf");
                    } catch (JRException ex) {
                        Logger.getLogger(Menu3.class.getName()).log(Level.SEVERE, null, ex);
                    }
                    System.out.println("salvou " + nome_curso);
                }
                if (jCheckBox7.isSelected()) {

                    nome_curso = jCheckBox7.getText();
                    parametros = (HashMap) obm.Met(nome_curso);
                    parametros.put("logo", getClass().getResourceAsStream("iconebarra.png"));
                    JasperPrint jp = null;
                    try {
                        jp = JasperFillManager.fillReport("./src/Relatorios/Grade2.jasper", parametros, con);
                    } catch (JRException ex) {
                        Logger.getLogger(Menu3.class.getName()).log(Level.SEVERE, null, ex);
                    }
                    try {
                        JasperExportManager.exportReportToPdfFile(jp, adober2 + "/" + nome_curso + ".pdf");
                    } catch (JRException ex) {
                        Logger.getLogger(Menu3.class.getName()).log(Level.SEVERE, null, ex);
                    }
                    System.out.println("salvou " + nome_curso);
                }
                if (jCheckBox8.isSelected()) {

                    nome_curso = jCheckBox8.getText();
                    parametros = (HashMap) obm.Met(nome_curso);
                    parametros.put("logo", getClass().getResourceAsStream("iconebarra.png"));
                    JasperPrint jp = null;
                    try {
                        jp = JasperFillManager.fillReport("./src/Relatorios/Grade2.jasper", parametros, con);
                    } catch (JRException ex) {
                        Logger.getLogger(Menu3.class.getName()).log(Level.SEVERE, null, ex);
                    }
                    try {
                        JasperExportManager.exportReportToPdfFile(jp, adober2 + "/" + nome_curso + ".pdf");
                    } catch (JRException ex) {
                        Logger.getLogger(Menu3.class.getName()).log(Level.SEVERE, null, ex);
                    }
                    System.out.println("salvou " + nome_curso);

                }
            } catch (SQLException ex) {
                Logger.getLogger(Menu3.class.getName()).log(Level.SEVERE, null, ex);
            }

        }
        JOptionPane.showMessageDialog(rootPane, "Grade(s) curriculare(s) gerada(s) com sucesso");
        }
    }//GEN-LAST:event_jFileChooser1ActionPerformed

    private void jButton10ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton10ActionPerformed
      java.awt.Dimension screenSize = java.awt.Toolkit.getDefaultToolkit().getScreenSize();
        jD_esc_rel.setBounds((screenSize.width-480)/2, (screenSize.height-250)/2, 480, 250);
        jD_esc_rel.setVisible(true);
        jD_grade_curricular.setVisible(false);
        jCheckBox1.setText("");
        jCheckBox2.setText("");
        jCheckBox3.setText("");
        jCheckBox4.setText("");
        jCheckBox5.setText("");
        jCheckBox6.setText("");
        jCheckBox7.setText("");
        jCheckBox8.setText("");
        
    }//GEN-LAST:event_jButton10ActionPerformed

    private void jB_relatorioActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jB_relatorioActionPerformed
        jDialog1.setVisible(false);
        jDialog2.setVisible(false);
        jDialog3.setVisible(false);
        jDialog4.setVisible(false);
        jPanel_curso.setVisible(false);
          jPanel_disciplina.setVisible(false);
          jPanel_serie.setVisible(false);
          jPanel_hora_aula.setVisible(false);
          jPanel_prof.setVisible(false);
          jD_addestagio.setVisible(false);
          jD_aula10.setVisible(false);
          jD_esc_rel.setVisible(false);
          jD_grade_curricular.setVisible(false);
          jD_salva.setVisible(false);
          jD_sn.setVisible(false);     
        java.awt.Dimension screenSize = java.awt.Toolkit.getDefaultToolkit().getScreenSize();
        jD_esc_rel.setBounds((screenSize.width-450)/2, (screenSize.height-240)/2, 480, 250);
        jD_esc_rel.setVisible(true);
    }//GEN-LAST:event_jB_relatorioActionPerformed

    private void jButton8ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton8ActionPerformed
       CursoMet cursomet=new CursoMet();
        if(cursomet.Buscar_Se_Ha_Curso()){
        Desabilita();
        SerieTurma();   
        java.awt.Dimension screenSize = java.awt.Toolkit.getDefaultToolkit().getScreenSize();
        jD_addestagio.setBounds((screenSize.width-624)/2, (screenSize.height-664)/2, 624, 664);
        jD_addestagio.setVisible(true);
 
       jD_sn.setVisible(false);
        
}else{
    JOptionPane.showMessageDialog(null, "Dados incompletos para geração");
}
    }//GEN-LAST:event_jButton8ActionPerformed

    private void jButton9ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton9ActionPerformed
       VerificaQuantHA();
    }//GEN-LAST:event_jButton9ActionPerformed

    private void jButton12ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton12ActionPerformed
     java.awt.Dimension screenSize = java.awt.Toolkit.getDefaultToolkit().getScreenSize();
        jD_esc_rel.setBounds((screenSize.width-480)/2, (screenSize.height-250)/2, 480, 250);
        jD_esc_rel.setVisible(true);
        jD_sn.setVisible(false);
    }//GEN-LAST:event_jButton12ActionPerformed

    private void jButton13ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton13ActionPerformed
              EstagiosTabela.id=1;
        if(buttonGroup1.getSelection()!=null){
            String a="3A";
            String b=turnoA;
            String c=serieAA.getText();
            
            EstagiosTabela.setEstagioA(a, b, c);
        }
        if(buttonGroup2.getSelection()!=null){
            String a="3B";
            String b=turnoB;
            String c=serieBB.getText();
            EstagiosTabela.setEstagioB(a, b, c);
        }
        if(buttonGroup3.getSelection()!=null){
            String a="3C";
            String b=turnoC;
            String c=serieCC.getText();
            EstagiosTabela.setEstagioC(a, b, c);
        }
        if(buttonGroup4.getSelection()!=null){
            String a="3D";
            String b=turnoD;
            String c=serieDD.getText();
            EstagiosTabela.setEstagioD(a, b, c);
        }
        if(buttonGroup5.getSelection()!=null){
            String a="3E";
            String b=turnoE;
            String c=serieEE.getText();
            EstagiosTabela.setEstagioE(a, b, c);
        }
        if(buttonGroup6.getSelection()!=null){
            String a="3F";
            String b=turnoF;
            String c=serieFF.getText();
            EstagiosTabela.setEstagioF(a, b, c);
        }
        if(buttonGroup7.getSelection()!=null){
            String a="3G";
            String b=turnoG;
            String c=serieGG.getText();
            EstagiosTabela.setEstagioF(a, b, c);
        }
        if(buttonGroup8.getSelection()!=null){
            String a="3H";
            String b=turnoH;
            String c=serieHH.getText();
            EstagiosTabela.setEstagioF(a, b, c);
        }
        VerificaQuantHA_est();
        buttonGroup1.clearSelection();buttonGroup2.clearSelection();buttonGroup3.clearSelection();
        buttonGroup4.clearSelection();buttonGroup5.clearSelection();buttonGroup6.clearSelection();
        buttonGroup7.clearSelection();buttonGroup8.clearSelection();
         
    }//GEN-LAST:event_jButton13ActionPerformed

    private void jButton14ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton14ActionPerformed
        buttonGroup1.clearSelection();buttonGroup2.clearSelection();buttonGroup3.clearSelection();
        buttonGroup4.clearSelection();buttonGroup5.clearSelection();buttonGroup6.clearSelection();
        buttonGroup7.clearSelection();buttonGroup8.clearSelection();
        java.awt.Dimension screenSize = java.awt.Toolkit.getDefaultToolkit().getScreenSize();
        jD_sn.setBounds((screenSize.width-449)/2, (screenSize.height-283)/2, 449, 283);
        jD_sn.setVisible(true);
        jD_addestagio.setVisible(false);
    }//GEN-LAST:event_jButton14ActionPerformed

    private void jButton16ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton16ActionPerformed
        if(VerificaDados()){
      
        if(jCheckBox111.isSelected()){
          prof.setNome(jCheckBox111.getText());
          int id= profmet.BuscaId(prof);
          profdias.setId_prof(id);
          profdias.setId_dias(1);
          profdias.setId_aula(10);
            try {
                profdiasmet.Adicionar(profdias);
            } catch (SQLException ex) {
                Logger.getLogger(Menu3.class.getName()).log(Level.SEVERE, null, ex);
            }
         profdias.setId_prof(id);
          profdias.setId_dias(2);
          profdias.setId_aula(10);
            try {
                profdiasmet.Adicionar(profdias);
            } catch (SQLException ex) {
                Logger.getLogger(Menu3.class.getName()).log(Level.SEVERE, null, ex);
            }
            
            profdias.setId_prof(id);
          profdias.setId_dias(3);
          profdias.setId_aula(10);
            try {
                profdiasmet.Adicionar(profdias);
            } catch (SQLException ex) {
                Logger.getLogger(Menu3.class.getName()).log(Level.SEVERE, null, ex);
            }
            
            profdias.setId_prof(id);
          profdias.setId_dias(4);
          profdias.setId_aula(10);
            try {
                profdiasmet.Adicionar(profdias);
            } catch (SQLException ex) {
                Logger.getLogger(Menu3.class.getName()).log(Level.SEVERE, null, ex);
            }
            
            profdias.setId_prof(id);
          profdias.setId_dias(5);
          profdias.setId_aula(10);
            try {
                profdiasmet.Adicionar(profdias);
            } catch (SQLException ex) {
                Logger.getLogger(Menu3.class.getName()).log(Level.SEVERE, null, ex);
            }
        }
        
            if(jCheckBox222.isSelected()){
          prof.setNome(jCheckBox222.getText());
          int id= profmet.BuscaId(prof);
          profdias.setId_prof(id);
          profdias.setId_dias(1);
          profdias.setId_aula(10);
            try {
                profdiasmet.Adicionar(profdias);
            } catch (SQLException ex) {
                Logger.getLogger(Menu3.class.getName()).log(Level.SEVERE, null, ex);
            }
         profdias.setId_prof(id);
          profdias.setId_dias(2);
          profdias.setId_aula(10);
            try {
                profdiasmet.Adicionar(profdias);
            } catch (SQLException ex) {
                Logger.getLogger(Menu3.class.getName()).log(Level.SEVERE, null, ex);
            }
            
            profdias.setId_prof(id);
          profdias.setId_dias(3);
          profdias.setId_aula(10);
            try {
                profdiasmet.Adicionar(profdias);
            } catch (SQLException ex) {
                Logger.getLogger(Menu3.class.getName()).log(Level.SEVERE, null, ex);
            }
            
            profdias.setId_prof(id);
          profdias.setId_dias(4);
          profdias.setId_aula(10);
            try {
                profdiasmet.Adicionar(profdias);
            } catch (SQLException ex) {
                Logger.getLogger(Menu3.class.getName()).log(Level.SEVERE, null, ex);
            }
            
            profdias.setId_prof(id);
          profdias.setId_dias(5);
          profdias.setId_aula(10);
            try {
                profdiasmet.Adicionar(profdias);
            } catch (SQLException ex) {
                Logger.getLogger(Menu3.class.getName()).log(Level.SEVERE, null, ex);
            }
        }
            
                    if(jCheckBox333.isSelected()){
          prof.setNome(jCheckBox333.getText());
          int id= profmet.BuscaId(prof);
          profdias.setId_prof(id);
          profdias.setId_dias(1);
          profdias.setId_aula(10);
            try {
                profdiasmet.Adicionar(profdias);
            } catch (SQLException ex) {
                Logger.getLogger(Menu3.class.getName()).log(Level.SEVERE, null, ex);
            }
         profdias.setId_prof(id);
          profdias.setId_dias(2);
          profdias.setId_aula(10);
            try {
                profdiasmet.Adicionar(profdias);
            } catch (SQLException ex) {
                Logger.getLogger(Menu3.class.getName()).log(Level.SEVERE, null, ex);
            }
            
            profdias.setId_prof(id);
          profdias.setId_dias(3);
          profdias.setId_aula(10);
            try {
                profdiasmet.Adicionar(profdias);
            } catch (SQLException ex) {
                Logger.getLogger(Menu3.class.getName()).log(Level.SEVERE, null, ex);
            }
            
            profdias.setId_prof(id);
          profdias.setId_dias(4);
          profdias.setId_aula(10);
            try {
                profdiasmet.Adicionar(profdias);
            } catch (SQLException ex) {
                Logger.getLogger(Menu3.class.getName()).log(Level.SEVERE, null, ex);
            }
            
            profdias.setId_prof(id);
          profdias.setId_dias(5);
          profdias.setId_aula(10);
            try {
                profdiasmet.Adicionar(profdias);
            } catch (SQLException ex) {
                Logger.getLogger(Menu3.class.getName()).log(Level.SEVERE, null, ex);
            }
        }
                            if(jCheckBox444.isSelected()){
          prof.setNome(jCheckBox444.getText());
          int id= profmet.BuscaId(prof);
          profdias.setId_prof(id);
          profdias.setId_dias(1);
          profdias.setId_aula(10);
            try {
                profdiasmet.Adicionar(profdias);
            } catch (SQLException ex) {
                Logger.getLogger(Menu3.class.getName()).log(Level.SEVERE, null, ex);
            }
         profdias.setId_prof(id);
          profdias.setId_dias(2);
          profdias.setId_aula(10);
            try {
                profdiasmet.Adicionar(profdias);
            } catch (SQLException ex) {
                Logger.getLogger(Menu3.class.getName()).log(Level.SEVERE, null, ex);
            }
            
            profdias.setId_prof(id);
          profdias.setId_dias(3);
          profdias.setId_aula(10);
            try {
                profdiasmet.Adicionar(profdias);
            } catch (SQLException ex) {
                Logger.getLogger(Menu3.class.getName()).log(Level.SEVERE, null, ex);
            }
            
            profdias.setId_prof(id);
          profdias.setId_dias(4);
          profdias.setId_aula(10);
            try {
                profdiasmet.Adicionar(profdias);
            } catch (SQLException ex) {
                Logger.getLogger(Menu3.class.getName()).log(Level.SEVERE, null, ex);
            }
            
            profdias.setId_prof(id);
          profdias.setId_dias(5);
          profdias.setId_aula(10);
            try {
                profdiasmet.Adicionar(profdias);
            } catch (SQLException ex) {
                Logger.getLogger(Menu3.class.getName()).log(Level.SEVERE, null, ex);
            }
        }
      
              if(jCheckBox555.isSelected()){
          prof.setNome(jCheckBox555.getText());
          int id= profmet.BuscaId(prof);
          profdias.setId_prof(id);
          profdias.setId_dias(1);
          profdias.setId_aula(10);
            try {
                profdiasmet.Adicionar(profdias);
            } catch (SQLException ex) {
                Logger.getLogger(Menu3.class.getName()).log(Level.SEVERE, null, ex);
            }
         profdias.setId_prof(id);
          profdias.setId_dias(2);
          profdias.setId_aula(10);
            try {
                profdiasmet.Adicionar(profdias);
            } catch (SQLException ex) {
                Logger.getLogger(Menu3.class.getName()).log(Level.SEVERE, null, ex);
            }
            
            profdias.setId_prof(id);
          profdias.setId_dias(3);
          profdias.setId_aula(10);
            try {
                profdiasmet.Adicionar(profdias);
            } catch (SQLException ex) {
                Logger.getLogger(Menu3.class.getName()).log(Level.SEVERE, null, ex);
            }
            
            profdias.setId_prof(id);
          profdias.setId_dias(4);
          profdias.setId_aula(10);
            try {
                profdiasmet.Adicionar(profdias);
            } catch (SQLException ex) {
                Logger.getLogger(Menu3.class.getName()).log(Level.SEVERE, null, ex);
            }
            
            profdias.setId_prof(id);
          profdias.setId_dias(5);
          profdias.setId_aula(10);
            try {
                profdiasmet.Adicionar(profdias);
            } catch (SQLException ex) {
                Logger.getLogger(Menu3.class.getName()).log(Level.SEVERE, null, ex);
            }
        }
                      if(jCheckBox666.isSelected()){
          prof.setNome(jCheckBox666.getText());
          int id= profmet.BuscaId(prof);
          profdias.setId_prof(id);
          profdias.setId_dias(1);
          profdias.setId_aula(10);
            try {
                profdiasmet.Adicionar(profdias);
            } catch (SQLException ex) {
                Logger.getLogger(Menu3.class.getName()).log(Level.SEVERE, null, ex);
            }
         profdias.setId_prof(id);
          profdias.setId_dias(2);
          profdias.setId_aula(10);
            try {
                profdiasmet.Adicionar(profdias);
            } catch (SQLException ex) {
                Logger.getLogger(Menu3.class.getName()).log(Level.SEVERE, null, ex);
            }
            
            profdias.setId_prof(id);
          profdias.setId_dias(3);
          profdias.setId_aula(10);
            try {
                profdiasmet.Adicionar(profdias);
            } catch (SQLException ex) {
                Logger.getLogger(Menu3.class.getName()).log(Level.SEVERE, null, ex);
            }
            
            profdias.setId_prof(id);
          profdias.setId_dias(4);
          profdias.setId_aula(10);
            try {
                profdiasmet.Adicionar(profdias);
            } catch (SQLException ex) {
                Logger.getLogger(Menu3.class.getName()).log(Level.SEVERE, null, ex);
            }
            
            profdias.setId_prof(id);
          profdias.setId_dias(5);
          profdias.setId_aula(10);
            try {
                profdiasmet.Adicionar(profdias);
            } catch (SQLException ex) {
                Logger.getLogger(Menu3.class.getName()).log(Level.SEVERE, null, ex);
            }
        }
                              if(jCheckBox777.isSelected()){
          prof.setNome(jCheckBox777.getText());
          int id= profmet.BuscaId(prof);
          profdias.setId_prof(id);
          profdias.setId_dias(1);
          profdias.setId_aula(10);
            try {
                profdiasmet.Adicionar(profdias);
            } catch (SQLException ex) {
                Logger.getLogger(Menu3.class.getName()).log(Level.SEVERE, null, ex);
            }
         profdias.setId_prof(id);
          profdias.setId_dias(2);
          profdias.setId_aula(10);
            try {
                profdiasmet.Adicionar(profdias);
            } catch (SQLException ex) {
                Logger.getLogger(Menu3.class.getName()).log(Level.SEVERE, null, ex);
            }
            
            profdias.setId_prof(id);
          profdias.setId_dias(3);
          profdias.setId_aula(10);
            try {
                profdiasmet.Adicionar(profdias);
            } catch (SQLException ex) {
                Logger.getLogger(Menu3.class.getName()).log(Level.SEVERE, null, ex);
            }
            
            profdias.setId_prof(id);
          profdias.setId_dias(4);
          profdias.setId_aula(10);
            try {
                profdiasmet.Adicionar(profdias);
            } catch (SQLException ex) {
                Logger.getLogger(Menu3.class.getName()).log(Level.SEVERE, null, ex);
            }
            
            profdias.setId_prof(id);
          profdias.setId_dias(5);
          profdias.setId_aula(10);
            try {
                profdiasmet.Adicionar(profdias);
            } catch (SQLException ex) {
                Logger.getLogger(Menu3.class.getName()).log(Level.SEVERE, null, ex);
            }
        }
                                      if(jCheckBox888.isSelected()){
          prof.setNome(jCheckBox888.getText());
          int id= profmet.BuscaId(prof);
          profdias.setId_prof(id);
          profdias.setId_dias(1);
          profdias.setId_aula(10);
            try {
                profdiasmet.Adicionar(profdias);
            } catch (SQLException ex) {
                Logger.getLogger(Menu3.class.getName()).log(Level.SEVERE, null, ex);
            }
         profdias.setId_prof(id);
          profdias.setId_dias(2);
          profdias.setId_aula(10);
            try {
                profdiasmet.Adicionar(profdias);
            } catch (SQLException ex) {
                Logger.getLogger(Menu3.class.getName()).log(Level.SEVERE, null, ex);
            }
            
            profdias.setId_prof(id);
          profdias.setId_dias(3);
          profdias.setId_aula(10);
            try {
                profdiasmet.Adicionar(profdias);
            } catch (SQLException ex) {
                Logger.getLogger(Menu3.class.getName()).log(Level.SEVERE, null, ex);
            }
            
            profdias.setId_prof(id);
          profdias.setId_dias(4);
          profdias.setId_aula(10);
            try {
                profdiasmet.Adicionar(profdias);
            } catch (SQLException ex) {
                Logger.getLogger(Menu3.class.getName()).log(Level.SEVERE, null, ex);
            }
            
            profdias.setId_prof(id);
          profdias.setId_dias(5);
          profdias.setId_aula(10);
            try {
                profdiasmet.Adicionar(profdias);
            } catch (SQLException ex) {
                Logger.getLogger(Menu3.class.getName()).log(Level.SEVERE, null, ex);
            }
        }
           if(jCheckBox999.isSelected()){
          prof.setNome(jCheckBox999.getText());
          int id= profmet.BuscaId(prof);
          profdias.setId_prof(id);
          profdias.setId_dias(1);
          profdias.setId_aula(10);
            try {
                profdiasmet.Adicionar(profdias);
            } catch (SQLException ex) {
                Logger.getLogger(Menu3.class.getName()).log(Level.SEVERE, null, ex);
            }
         profdias.setId_prof(id);
          profdias.setId_dias(2);
          profdias.setId_aula(10);
            try {
                profdiasmet.Adicionar(profdias);
            } catch (SQLException ex) {
                Logger.getLogger(Menu3.class.getName()).log(Level.SEVERE, null, ex);
            }
            
            profdias.setId_prof(id);
          profdias.setId_dias(3);
          profdias.setId_aula(10);
            try {
                profdiasmet.Adicionar(profdias);
            } catch (SQLException ex) {
                Logger.getLogger(Menu3.class.getName()).log(Level.SEVERE, null, ex);
            }
            
            profdias.setId_prof(id);
          profdias.setId_dias(4);
          profdias.setId_aula(10);
            try {
                profdiasmet.Adicionar(profdias);
            } catch (SQLException ex) {
                Logger.getLogger(Menu3.class.getName()).log(Level.SEVERE, null, ex);
            }
            
            profdias.setId_prof(id);
          profdias.setId_dias(5);
          profdias.setId_aula(10);
            try {
                profdiasmet.Adicionar(profdias);
            } catch (SQLException ex) {
                Logger.getLogger(Menu3.class.getName()).log(Level.SEVERE, null, ex);
            }
        }                                
              if(jCheckBox100.isSelected()){
          prof.setNome(jCheckBox100.getText());
          int id= profmet.BuscaId(prof);
          profdias.setId_prof(id);
          profdias.setId_dias(1);
          profdias.setId_aula(10);
            try {
                profdiasmet.Adicionar(profdias);
            } catch (SQLException ex) {
                Logger.getLogger(Menu3.class.getName()).log(Level.SEVERE, null, ex);
            }
         profdias.setId_prof(id);
          profdias.setId_dias(2);
          profdias.setId_aula(10);
            try {
                profdiasmet.Adicionar(profdias);
            } catch (SQLException ex) {
                Logger.getLogger(Menu3.class.getName()).log(Level.SEVERE, null, ex);
            }
            
            profdias.setId_prof(id);
          profdias.setId_dias(3);
          profdias.setId_aula(10);
            try {
                profdiasmet.Adicionar(profdias);
            } catch (SQLException ex) {
                Logger.getLogger(Menu3.class.getName()).log(Level.SEVERE, null, ex);
            }
            
            profdias.setId_prof(id);
          profdias.setId_dias(4);
          profdias.setId_aula(10);
            try {
                profdiasmet.Adicionar(profdias);
            } catch (SQLException ex) {
                Logger.getLogger(Menu3.class.getName()).log(Level.SEVERE, null, ex);
            }
            
            profdias.setId_prof(id);
          profdias.setId_dias(5);
          profdias.setId_aula(10);
            try {
                profdiasmet.Adicionar(profdias);
            } catch (SQLException ex) {
                Logger.getLogger(Menu3.class.getName()).log(Level.SEVERE, null, ex);
            }
        }     
            if(jCheckBox110.isSelected()){
          prof.setNome(jCheckBox110.getText());
          int id= profmet.BuscaId(prof);
          profdias.setId_prof(id);
          profdias.setId_dias(1);
          profdias.setId_aula(10);
            try {
                profdiasmet.Adicionar(profdias);
            } catch (SQLException ex) {
                Logger.getLogger(Menu3.class.getName()).log(Level.SEVERE, null, ex);
            }
         profdias.setId_prof(id);
          profdias.setId_dias(2);
          profdias.setId_aula(10);
            try {
                profdiasmet.Adicionar(profdias);
            } catch (SQLException ex) {
                Logger.getLogger(Menu3.class.getName()).log(Level.SEVERE, null, ex);
            }
            
            profdias.setId_prof(id);
          profdias.setId_dias(3);
          profdias.setId_aula(10);
            try {
                profdiasmet.Adicionar(profdias);
            } catch (SQLException ex) {
                Logger.getLogger(Menu3.class.getName()).log(Level.SEVERE, null, ex);
            }
            
            profdias.setId_prof(id);
          profdias.setId_dias(4);
          profdias.setId_aula(10);
            try {
                profdiasmet.Adicionar(profdias);
            } catch (SQLException ex) {
                Logger.getLogger(Menu3.class.getName()).log(Level.SEVERE, null, ex);
            }
            
            profdias.setId_prof(id);
          profdias.setId_dias(5);
          profdias.setId_aula(10);
            try {
                profdiasmet.Adicionar(profdias);
            } catch (SQLException ex) {
                Logger.getLogger(Menu3.class.getName()).log(Level.SEVERE, null, ex);
            }
        }          
            if(jCheckBox120.isSelected()){
          prof.setNome(jCheckBox120.getText());
          int id= profmet.BuscaId(prof);
          profdias.setId_prof(id);
          profdias.setId_dias(1);
          profdias.setId_aula(10);
            try {
                profdiasmet.Adicionar(profdias);
            } catch (SQLException ex) {
                Logger.getLogger(Menu3.class.getName()).log(Level.SEVERE, null, ex);
            }
         profdias.setId_prof(id);
          profdias.setId_dias(2);
          profdias.setId_aula(10);
            try {
                profdiasmet.Adicionar(profdias);
            } catch (SQLException ex) {
                Logger.getLogger(Menu3.class.getName()).log(Level.SEVERE, null, ex);
            }
            
            profdias.setId_prof(id);
          profdias.setId_dias(3);
          profdias.setId_aula(10);
            try {
                profdiasmet.Adicionar(profdias);
            } catch (SQLException ex) {
                Logger.getLogger(Menu3.class.getName()).log(Level.SEVERE, null, ex);
            }
            
            profdias.setId_prof(id);
          profdias.setId_dias(4);
          profdias.setId_aula(10);
            try {
                profdiasmet.Adicionar(profdias);
            } catch (SQLException ex) {
                Logger.getLogger(Menu3.class.getName()).log(Level.SEVERE, null, ex);
            }
            
            profdias.setId_prof(id);
          profdias.setId_dias(5);
          profdias.setId_aula(10);
            try {
                profdiasmet.Adicionar(profdias);
            } catch (SQLException ex) {
                Logger.getLogger(Menu3.class.getName()).log(Level.SEVERE, null, ex);
            }
        }
            if(jCheckBox130.isSelected()){
          prof.setNome(jCheckBox130.getText());
          int id= profmet.BuscaId(prof);
          profdias.setId_prof(id);
          profdias.setId_dias(1);
          profdias.setId_aula(10);
            try {
                profdiasmet.Adicionar(profdias);
            } catch (SQLException ex) {
                Logger.getLogger(Menu3.class.getName()).log(Level.SEVERE, null, ex);
            }
         profdias.setId_prof(id);
          profdias.setId_dias(2);
          profdias.setId_aula(10);
            try {
                profdiasmet.Adicionar(profdias);
            } catch (SQLException ex) {
                Logger.getLogger(Menu3.class.getName()).log(Level.SEVERE, null, ex);
            }
            
            profdias.setId_prof(id);
          profdias.setId_dias(3);
          profdias.setId_aula(10);
            try {
                profdiasmet.Adicionar(profdias);
            } catch (SQLException ex) {
                Logger.getLogger(Menu3.class.getName()).log(Level.SEVERE, null, ex);
            }
            
            profdias.setId_prof(id);
          profdias.setId_dias(4);
          profdias.setId_aula(10);
            try {
                profdiasmet.Adicionar(profdias);
            } catch (SQLException ex) {
                Logger.getLogger(Menu3.class.getName()).log(Level.SEVERE, null, ex);
            }
            
            profdias.setId_prof(id);
          profdias.setId_dias(5);
          profdias.setId_aula(10);
            try {
                profdiasmet.Adicionar(profdias);
            } catch (SQLException ex) {
                Logger.getLogger(Menu3.class.getName()).log(Level.SEVERE, null, ex);
            }
        }
            if(jCheckBox140.isSelected()){
          prof.setNome(jCheckBox140.getText());
          int id= profmet.BuscaId(prof);
          profdias.setId_prof(id);
          profdias.setId_dias(1);
          profdias.setId_aula(10);
            try {
                profdiasmet.Adicionar(profdias);
            } catch (SQLException ex) {
                Logger.getLogger(Menu3.class.getName()).log(Level.SEVERE, null, ex);
            }
         profdias.setId_prof(id);
          profdias.setId_dias(2);
          profdias.setId_aula(10);
            try {
                profdiasmet.Adicionar(profdias);
            } catch (SQLException ex) {
                Logger.getLogger(Menu3.class.getName()).log(Level.SEVERE, null, ex);
            }
            
            profdias.setId_prof(id);
          profdias.setId_dias(3);
          profdias.setId_aula(10);
            try {
                profdiasmet.Adicionar(profdias);
            } catch (SQLException ex) {
                Logger.getLogger(Menu3.class.getName()).log(Level.SEVERE, null, ex);
            }
            
            profdias.setId_prof(id);
          profdias.setId_dias(4);
          profdias.setId_aula(10);
            try {
                profdiasmet.Adicionar(profdias);
            } catch (SQLException ex) {
                Logger.getLogger(Menu3.class.getName()).log(Level.SEVERE, null, ex);
            }
            
            profdias.setId_prof(id);
          profdias.setId_dias(5);
          profdias.setId_aula(10);
            try {
                profdiasmet.Adicionar(profdias);
            } catch (SQLException ex) {
                Logger.getLogger(Menu3.class.getName()).log(Level.SEVERE, null, ex);
            }
        }
           if(jCheckBox150.isSelected()){
          prof.setNome(jCheckBox150.getText());
          int id= profmet.BuscaId(prof);
          profdias.setId_prof(id);
          profdias.setId_dias(1);
          profdias.setId_aula(10);
            try {
                profdiasmet.Adicionar(profdias);
            } catch (SQLException ex) {
                Logger.getLogger(Menu3.class.getName()).log(Level.SEVERE, null, ex);
            }
         profdias.setId_prof(id);
          profdias.setId_dias(2);
          profdias.setId_aula(10);
            try {
                profdiasmet.Adicionar(profdias);
            } catch (SQLException ex) {
                Logger.getLogger(Menu3.class.getName()).log(Level.SEVERE, null, ex);
            }
            
            profdias.setId_prof(id);
          profdias.setId_dias(3);
          profdias.setId_aula(10);
            try {
                profdiasmet.Adicionar(profdias);
            } catch (SQLException ex) {
                Logger.getLogger(Menu3.class.getName()).log(Level.SEVERE, null, ex);
            }
            
            profdias.setId_prof(id);
          profdias.setId_dias(4);
          profdias.setId_aula(10);
            try {
                profdiasmet.Adicionar(profdias);
            } catch (SQLException ex) {
                Logger.getLogger(Menu3.class.getName()).log(Level.SEVERE, null, ex);
            }
            
            profdias.setId_prof(id);
          profdias.setId_dias(5);
          profdias.setId_aula(10);
            try {
                profdiasmet.Adicionar(profdias);
            } catch (SQLException ex) {
                Logger.getLogger(Menu3.class.getName()).log(Level.SEVERE, null, ex);
            }
        }
            if(jCheckBox160.isSelected()){
          prof.setNome(jCheckBox160.getText());
          int id= profmet.BuscaId(prof);
          profdias.setId_prof(id);
          profdias.setId_dias(1);
          profdias.setId_aula(10);
            try {
                profdiasmet.Adicionar(profdias);
            } catch (SQLException ex) {
                Logger.getLogger(Menu3.class.getName()).log(Level.SEVERE, null, ex);
            }
         profdias.setId_prof(id);
          profdias.setId_dias(2);
          profdias.setId_aula(10);
            try {
                profdiasmet.Adicionar(profdias);
            } catch (SQLException ex) {
                Logger.getLogger(Menu3.class.getName()).log(Level.SEVERE, null, ex);
            }
            
            profdias.setId_prof(id);
          profdias.setId_dias(3);
          profdias.setId_aula(10);
            try {
                profdiasmet.Adicionar(profdias);
            } catch (SQLException ex) {
                Logger.getLogger(Menu3.class.getName()).log(Level.SEVERE, null, ex);
            }
            
            profdias.setId_prof(id);
          profdias.setId_dias(4);
          profdias.setId_aula(10);
            try {
                profdiasmet.Adicionar(profdias);
            } catch (SQLException ex) {
                Logger.getLogger(Menu3.class.getName()).log(Level.SEVERE, null, ex);
            }
            
            profdias.setId_prof(id);
          profdias.setId_dias(5);
          profdias.setId_aula(10);
            try {
                profdiasmet.Adicionar(profdias);
            } catch (SQLException ex) {
                Logger.getLogger(Menu3.class.getName()).log(Level.SEVERE, null, ex);
            }
        }
             if(jCheckBox170.isSelected()){
          prof.setNome(jCheckBox170.getText());
          int id= profmet.BuscaId(prof);
          profdias.setId_prof(id);
          profdias.setId_dias(1);
          profdias.setId_aula(10);
            try {
                profdiasmet.Adicionar(profdias);
            } catch (SQLException ex) {
                Logger.getLogger(Menu3.class.getName()).log(Level.SEVERE, null, ex);
            }
         profdias.setId_prof(id);
          profdias.setId_dias(2);
          profdias.setId_aula(10);
            try {
                profdiasmet.Adicionar(profdias);
            } catch (SQLException ex) {
                Logger.getLogger(Menu3.class.getName()).log(Level.SEVERE, null, ex);
            }
            
            profdias.setId_prof(id);
          profdias.setId_dias(3);
          profdias.setId_aula(10);
            try {
                profdiasmet.Adicionar(profdias);
            } catch (SQLException ex) {
                Logger.getLogger(Menu3.class.getName()).log(Level.SEVERE, null, ex);
            }
            
            profdias.setId_prof(id);
          profdias.setId_dias(4);
          profdias.setId_aula(10);
            try {
                profdiasmet.Adicionar(profdias);
            } catch (SQLException ex) {
                Logger.getLogger(Menu3.class.getName()).log(Level.SEVERE, null, ex);
            }
            
            profdias.setId_prof(id);
          profdias.setId_dias(5);
          profdias.setId_aula(10);
            try {
                profdiasmet.Adicionar(profdias);
            } catch (SQLException ex) {
                Logger.getLogger(Menu3.class.getName()).log(Level.SEVERE, null, ex);
            }
        }
                     if(jCheckBox180.isSelected()){
          prof.setNome(jCheckBox180.getText());
          int id= profmet.BuscaId(prof);
          profdias.setId_prof(id);
          profdias.setId_dias(1);
          profdias.setId_aula(10);
            try {
                profdiasmet.Adicionar(profdias);
            } catch (SQLException ex) {
                Logger.getLogger(Menu3.class.getName()).log(Level.SEVERE, null, ex);
            }
         profdias.setId_prof(id);
          profdias.setId_dias(2);
          profdias.setId_aula(10);
            try {
                profdiasmet.Adicionar(profdias);
            } catch (SQLException ex) {
                Logger.getLogger(Menu3.class.getName()).log(Level.SEVERE, null, ex);
            }
            
            profdias.setId_prof(id);
          profdias.setId_dias(3);
          profdias.setId_aula(10);
            try {
                profdiasmet.Adicionar(profdias);
            } catch (SQLException ex) {
                Logger.getLogger(Menu3.class.getName()).log(Level.SEVERE, null, ex);
            }
            
            profdias.setId_prof(id);
          profdias.setId_dias(4);
          profdias.setId_aula(10);
            try {
                profdiasmet.Adicionar(profdias);
            } catch (SQLException ex) {
                Logger.getLogger(Menu3.class.getName()).log(Level.SEVERE, null, ex);
            }
            
            profdias.setId_prof(id);
          profdias.setId_dias(5);
          profdias.setId_aula(10);
            try {
                profdiasmet.Adicionar(profdias);
            } catch (SQLException ex) {
                Logger.getLogger(Menu3.class.getName()).log(Level.SEVERE, null, ex);
            }
        }
        dispose();
          java.awt.EventQueue.invokeLater(new Runnable() {

            @Override
            public void run() {
                new Aguarde2().setVisible(true);
            }
        });
              jD_aula10.setVisible(false);
      
        }else{
            JOptionPane.showMessageDialog(rootPane, "Selecione no mínimo 5 professores");
        }
    }//GEN-LAST:event_jButton16ActionPerformed

    private void jButton15ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton15ActionPerformed

        java.awt.Dimension screenSize = java.awt.Toolkit.getDefaultToolkit().getScreenSize();       
        jD_addestagio.setBounds((screenSize.width-624)/2, (screenSize.height-664)/2, 624, 664);
        jD_addestagio.setVisible(true);
     
        jD_aula10.setVisible(false);
    }//GEN-LAST:event_jButton15ActionPerformed

    private void RB_manhaAItemStateChanged(java.awt.event.ItemEvent evt) {//GEN-FIRST:event_RB_manhaAItemStateChanged
       turnoA=RB_manhaA.getText();   
    }//GEN-LAST:event_RB_manhaAItemStateChanged

    private void RB_tardeAItemStateChanged(java.awt.event.ItemEvent evt) {//GEN-FIRST:event_RB_tardeAItemStateChanged
      turnoA=RB_tardeA.getText(); 
    }//GEN-LAST:event_RB_tardeAItemStateChanged

    private void RB_manhaBItemStateChanged(java.awt.event.ItemEvent evt) {//GEN-FIRST:event_RB_manhaBItemStateChanged
        turnoB=RB_manhaB.getText();
    }//GEN-LAST:event_RB_manhaBItemStateChanged

    private void RB_tardeBItemStateChanged(java.awt.event.ItemEvent evt) {//GEN-FIRST:event_RB_tardeBItemStateChanged
       turnoB=RB_tardeB.getText(); 
    }//GEN-LAST:event_RB_tardeBItemStateChanged

    private void RB_manhaCItemStateChanged(java.awt.event.ItemEvent evt) {//GEN-FIRST:event_RB_manhaCItemStateChanged
        turnoC=RB_manhaC.getText(); 
    }//GEN-LAST:event_RB_manhaCItemStateChanged

    private void RB_tardeCItemStateChanged(java.awt.event.ItemEvent evt) {//GEN-FIRST:event_RB_tardeCItemStateChanged
        turnoC=RB_tardeC.getText();   
    }//GEN-LAST:event_RB_tardeCItemStateChanged

    private void RB_manhaDItemStateChanged(java.awt.event.ItemEvent evt) {//GEN-FIRST:event_RB_manhaDItemStateChanged
        turnoD=RB_manhaD.getText();   
    }//GEN-LAST:event_RB_manhaDItemStateChanged

    private void RB_tardeDItemStateChanged(java.awt.event.ItemEvent evt) {//GEN-FIRST:event_RB_tardeDItemStateChanged
        turnoD=RB_tardeD.getText();    
    }//GEN-LAST:event_RB_tardeDItemStateChanged

    private void RB_manhaEItemStateChanged(java.awt.event.ItemEvent evt) {//GEN-FIRST:event_RB_manhaEItemStateChanged
        turnoE=RB_manhaE.getText(); 
    }//GEN-LAST:event_RB_manhaEItemStateChanged

    private void RB_tardeEItemStateChanged(java.awt.event.ItemEvent evt) {//GEN-FIRST:event_RB_tardeEItemStateChanged
        turnoE=RB_tardeE.getText(); 
    }//GEN-LAST:event_RB_tardeEItemStateChanged

    private void RB_manhaFItemStateChanged(java.awt.event.ItemEvent evt) {//GEN-FIRST:event_RB_manhaFItemStateChanged
       turnoF=RB_manhaF.getText();   
    }//GEN-LAST:event_RB_manhaFItemStateChanged

    private void RB_tardeFItemStateChanged(java.awt.event.ItemEvent evt) {//GEN-FIRST:event_RB_tardeFItemStateChanged
       turnoF=RB_tardeF.getText(); 
    }//GEN-LAST:event_RB_tardeFItemStateChanged

    private void RB_manhaGItemStateChanged(java.awt.event.ItemEvent evt) {//GEN-FIRST:event_RB_manhaGItemStateChanged
       turnoG=RB_manhaG.getText();
    }//GEN-LAST:event_RB_manhaGItemStateChanged

    private void RB_tardeGItemStateChanged(java.awt.event.ItemEvent evt) {//GEN-FIRST:event_RB_tardeGItemStateChanged
        turnoG=RB_tardeG.getText();   
    }//GEN-LAST:event_RB_tardeGItemStateChanged

    private void RB_manhaHItemStateChanged(java.awt.event.ItemEvent evt) {//GEN-FIRST:event_RB_manhaHItemStateChanged
        turnoH=RB_manhaH.getText();
    }//GEN-LAST:event_RB_manhaHItemStateChanged

    private void RB_tardeHItemStateChanged(java.awt.event.ItemEvent evt) {//GEN-FIRST:event_RB_tardeHItemStateChanged
        turnoH=RB_tardeH.getText();   
    }//GEN-LAST:event_RB_tardeHItemStateChanged

    private void jB_profActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jB_profActionPerformed
          jPanel_curso.setVisible(false);
          jPanel_disciplina.setVisible(false);
          jPanel_serie.setVisible(false);
          jPanel_hora_aula.setVisible(false);
          jDialog1.setVisible(false);
        jDialog2.setVisible(false);
        jDialog3.setVisible(false);
        jDialog4.setVisible(false);
          jD_addestagio.setVisible(false);
          jD_aula10.setVisible(false);
          jD_esc_rel.setVisible(false);
          jD_grade_curricular.setVisible(false);
          jD_salva.setVisible(false);
          jD_sn.setVisible(false);    
          DesabilitaADD();
          DesabilitaALTDEL();
          jPanel_prof.setVisible(true);
    }//GEN-LAST:event_jB_profActionPerformed

    private void JTF_Pesquisar_profKeyReleased(java.awt.event.KeyEvent evt) {//GEN-FIRST:event_JTF_Pesquisar_profKeyReleased
 listarProfessor();  
    }//GEN-LAST:event_JTF_Pesquisar_profKeyReleased

    private void JTF_Pesquisarmaterias_profKeyReleased(java.awt.event.KeyEvent evt) {//GEN-FIRST:event_JTF_Pesquisarmaterias_profKeyReleased
        AbilitaBuscarMaterias();
    }//GEN-LAST:event_JTF_Pesquisarmaterias_profKeyReleased

    private void timer1OnTime(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_timer1OnTime
         d1=Porenquanto.getM1();
        if("".equals(d1)){
            a=1;
        }
        d2=Porenquanto.getM2();
        if("".equals(d2)){
            b=1;
        }
        d3=Porenquanto.getM3();
        if("".equals(d3)){
            c=1;
        }
        d4=Porenquanto.getM4();
        if("".equals(d4)){
            d=1;
        }
        d5=Porenquanto.getM5();
        if("".equals(d5)){
            e=1;
        }
        d6=Porenquanto.getM6();
        if("".equals(d6)){
            f=1;
        }
        d7=Porenquanto.getM7();
        if("".equals(d7)){
            g=1;
        }
        d8=Porenquanto.getM8();
        if("".equals(d8)){
            h=1;
        }
        d9=Porenquanto.getM9();
        if("".equals(d9)){
            i=1;
        }
        d10=Porenquanto.getM10();
        if("".equals(d10)){
            j=1;
        }
        d11=Porenquanto.getM11();
        if("".equals(d11)){
            k=1;
        }
        d12=Porenquanto.getM12();
        if("".equals(d12)){
            l=1;
        }
        d13=Porenquanto.getM13();
        if("".equals(d13)){
            m=1;
        }
        d14=Porenquanto.getM14();
        if("".equals(d14)){
            n=1;
        }
        d15=Porenquanto.getM15();
        if("".equals(d15)){
            o=1;
        }
        d16=Porenquanto.getM16();
        if("".equals(d16)){
            p=1;
        }
        d17=Porenquanto.getM17();
        if("".equals(d17)){
            q=1;
        }
        d18=Porenquanto.getM18();
        if("".equals(d18)){
            r=1;
        }
        d19=Porenquanto.getM19();
        if("".equals(d19)){
            s=1;
        }
        d20=Porenquanto.getM20();
        if("".equals(d20)){
            t=1;
        }
        d21=Porenquanto.getM21();
        if("".equals(d21)){
            u=1;
        }
        d22=Porenquanto.getM22();
        if("".equals(d22)){
            v=1;
        }
        d23=Porenquanto.getM23();
        if("".equals(d23)){
            w=1;
        }
        d24=Porenquanto.getM24();
        if("".equals(d24)){
            x=1;
        }
        d25=Porenquanto.getM25();
        if("".equals(d25)){
            y=1;
        }
        d26=Porenquanto.getM26();
        if("".equals(d26)){
            z=1;
        }
        disc11=disc1_prof.getText();
        disc22=disc2_prof.getText();
        disc33=disc3_prof.getText();
        disc44=disc4_prof.getText();
        disc55=disc5_prof.getText();
        disc1();
        disc2();
        disc3();
        disc4();
        disc5();
    }//GEN-LAST:event_timer1OnTime

    private void JTF_Pesquisarmaterias1_profKeyReleased(java.awt.event.KeyEvent evt) {//GEN-FIRST:event_JTF_Pesquisarmaterias1_profKeyReleased
        AbilitaBuscarDiscCurso();
    }//GEN-LAST:event_JTF_Pesquisarmaterias1_profKeyReleased

    private void disc5_profMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_disc5_profMouseClicked
        if("Clique aqui para adicionar uma disciplina".equals(disc5_prof.getText())){
            qwe=5;
            AbilitaBuscarMaterias();
            java.awt.Dimension screenSize = java.awt.Toolkit.getDefaultToolkit().getScreenSize();
            jDialog2.setBounds((screenSize.width-520)/2, (screenSize.height-350)/2, 520, 350);
            jDialog2.setVisible(true);
        }
    }//GEN-LAST:event_disc5_profMouseClicked

    private void JLDisc5_profMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_JLDisc5_profMouseClicked
         if(jRB_adicionar_prof.isSelected()){
         if(disc5_prof.getText().equals(d1)){d1="";Porenquanto.setM1("");}
         if(disc5_prof.getText().equals(d2)){d2="";Porenquanto.setM2("");}
         if(disc5_prof.getText().equals(d3)){d3="";Porenquanto.setM3("");}
         if(disc5_prof.getText().equals(d4)){d4="";Porenquanto.setM4("");}
         if(disc5_prof.getText().equals(d5)){d5="";Porenquanto.setM5("");}
         if(disc5_prof.getText().equals(d6)){d6="";Porenquanto.setM6("");}
         if(disc5_prof.getText().equals(d7)){d7="";Porenquanto.setM7("");}
         if(disc5_prof.getText().equals(d8)){d8="";Porenquanto.setM8("");}
         if(disc5_prof.getText().equals(d9)){d9="";Porenquanto.setM9("");}
         if(disc5_prof.getText().equals(d10)){d10="";Porenquanto.setM10("");}
         if(disc5_prof.getText().equals(d11)){d11="";Porenquanto.setM11("");}
         if(disc5_prof.getText().equals(d12)){d12="";Porenquanto.setM12("");}
         if(disc5_prof.getText().equals(d13)){d13="";Porenquanto.setM13("");}
         if(disc5_prof.getText().equals(d14)){d14="";Porenquanto.setM14("");}
         if(disc5_prof.getText().equals(d15)){d15="";Porenquanto.setM15("");}
         if(disc5_prof.getText().equals(d16)){d16="";Porenquanto.setM16("");}
         if(disc5_prof.getText().equals(d17)){d17="";Porenquanto.setM17("");}
         if(disc5_prof.getText().equals(d18)){d18="";Porenquanto.setM18("");}
         if(disc5_prof.getText().equals(d19)){d19="";Porenquanto.setM19("");}
         if(disc5_prof.getText().equals(d20)){d20="";Porenquanto.setM20("");}
         if(disc5_prof.getText().equals(d21)){d21="";Porenquanto.setM21("");}
         if(disc5_prof.getText().equals(d22)){d22="";Porenquanto.setM22("");}
         if(disc5_prof.getText().equals(d23)){d23="";Porenquanto.setM23("");}
         if(disc5_prof.getText().equals(d24)){d24="";Porenquanto.setM24("");}
         if(disc5_prof.getText().equals(d25)){d25="";Porenquanto.setM25("");}
         if(disc5_prof.getText().equals(d26)){d26="";Porenquanto.setM26("");}
          disc5_prof.setText("");
}else{
          disc5_prof.setText("Clique aqui para adicionar uma disciplina");
      }   
    }//GEN-LAST:event_JLDisc5_profMouseClicked

    private void jRB_edt_del_profItemStateChanged(java.awt.event.ItemEvent evt) {//GEN-FIRST:event_jRB_edt_del_profItemStateChanged
        if(jRB_edt_del_prof.isSelected()){
            limpaDadosADD();
            try {
                listaP = profmet.BuscarNome("%");
            } catch (SQLException ex) {
                Logger.getLogger(Menu3.class.getName()).log(Level.SEVERE, null, ex);
            }
            if(listaP.isEmpty()){
                JOptionPane.showMessageDialog(null, "Não há Professores cadastrados.");
                DesabilitaADD();
                buttonGroup1.clearSelection();

            }else{
                DesabilitaADD();
                java.awt.Dimension screenSize = java.awt.Toolkit.getDefaultToolkit().getScreenSize();
                jDialog1.setBounds((screenSize.width-300)/2, (screenSize.height-350)/2, 520, 350);
                jDialog1.setVisible(true);

                listarProfessor();

            }

        }
    }//GEN-LAST:event_jRB_edt_del_profItemStateChanged

    private void jRB_adicionar_profItemStateChanged(java.awt.event.ItemEvent evt) {//GEN-FIRST:event_jRB_adicionar_profItemStateChanged
        if(jRB_adicionar_prof.isSelected()){
            jDialog1.setVisible(false);
            limpaDadosALTDEL();
            DesabilitaALTDEL();
            escolha=jRB_adicionar_prof.getText();
            ChamaEscolha(escolha);
            VerificaSerieTurma();
        }
    }//GEN-LAST:event_jRB_adicionar_profItemStateChanged

    private void disc2_profMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_disc2_profMouseClicked
        if("Clique aqui para adicionar uma disciplina".equals(disc2_prof.getText())){
            qwe=2;
            AbilitaBuscarMaterias();
            java.awt.Dimension screenSize = java.awt.Toolkit.getDefaultToolkit().getScreenSize();
            jDialog2.setBounds((screenSize.width-520)/2, (screenSize.height-350)/2, 520, 350);
            jDialog2.setVisible(true);
        }
    }//GEN-LAST:event_disc2_profMouseClicked

    private void jRB_regular_profItemStateChanged(java.awt.event.ItemEvent evt) {//GEN-FIRST:event_jRB_regular_profItemStateChanged
       

        if(jRB_regular_prof.isSelected()){
            if(discmet.BuscaSEHADiscReg()){
                AbilitaBuscarDiscReg();
                java.awt.Dimension screenSize = java.awt.Toolkit.getDefaultToolkit().getScreenSize();
                jDialog4.setBounds((screenSize.width-520)/2, (screenSize.height-350)/2, 520, 350);
                jDialog4.setVisible(true);
                
        }else{
            JOptionPane.showMessageDialog(null, "Não existem materias regulares cadastradas");
        }
        }
    }//GEN-LAST:event_jRB_regular_profItemStateChanged

    private void jRB_profissional_profItemStateChanged(java.awt.event.ItemEvent evt) {//GEN-FIRST:event_jRB_profissional_profItemStateChanged
        CursoMet cursomet=new CursoMet();

        if(jRB_profissional_prof.isSelected()){
            if(cursomet.Buscar_Se_Ha_Curso()){
                AbilitaBuscarDiscCurso();
                java.awt.Dimension screenSize = java.awt.Toolkit.getDefaultToolkit().getScreenSize();
                jDialog3.setBounds((screenSize.width-520)/2, (screenSize.height-350)/2, 520, 350);
                jDialog3.setVisible(true);
                //          java.awt.EventQueue.invokeLater(new Runnable() {
                    //
                    //            @Override
                    //            public void run() {
                        //                new FormCursoDinamico().setVisible(true);
                        //            }
                    //        });
        }else{
            JOptionPane.showMessageDialog(null, "Não existem materias profissionais cadastradas");
        }
        }

    }//GEN-LAST:event_jRB_profissional_profItemStateChanged

    private void disc3_profMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_disc3_profMouseClicked
        if("Clique aqui para adicionar uma disciplina".equals(disc3_prof.getText())){
            qwe=3;
            AbilitaBuscarMaterias();
            java.awt.Dimension screenSize = java.awt.Toolkit.getDefaultToolkit().getScreenSize();
            jDialog2.setBounds((screenSize.width-520)/2, (screenSize.height-350)/2, 520, 350);
            jDialog2.setVisible(true);
        }
    }//GEN-LAST:event_disc3_profMouseClicked

    private void disc4_profMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_disc4_profMouseClicked
        if("Clique aqui para adicionar uma disciplina".equals(disc4_prof.getText())){
            qwe=4;
            AbilitaBuscarMaterias();
            java.awt.Dimension screenSize = java.awt.Toolkit.getDefaultToolkit().getScreenSize();
            jDialog2.setBounds((screenSize.width-520)/2, (screenSize.height-350)/2, 520, 350);
            jDialog2.setVisible(true);
        }
    }//GEN-LAST:event_disc4_profMouseClicked

    private void disc1_profMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_disc1_profMouseClicked
        if("Clique aqui para adicionar uma disciplina".equals(disc1_prof.getText())){
            qwe=1;
            AbilitaBuscarMaterias();
            java.awt.Dimension screenSize = java.awt.Toolkit.getDefaultToolkit().getScreenSize();
            jDialog2.setBounds((screenSize.width-520)/2, (screenSize.height-350)/2, 520, 350);
            jDialog2.setVisible(true);
        }
    }//GEN-LAST:event_disc1_profMouseClicked

    private void jTable2MouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_jTable2MouseClicked
        jTable2.setSelectionBackground(getForeground());
        jTable2.setSelectionForeground(getBackground());
        coluna=jTable2.getSelectedColumn();
        linha=jTable2.getSelectedRow();
        String verf=(String) jTable2.getValueAt(linha, coluna);
        if(!"".equals(verf)){
            jTable2.setValueAt("", linha, coluna);
        }else{
            jTable2.setValueAt("    Disponivel", linha, coluna);
        }
    }//GEN-LAST:event_jTable2MouseClicked

    private void marcarMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_marcarMouseClicked
        jTable2.getModel().setValueAt("    Disponivel", 0,0);
        jTable2.getModel().setValueAt("    Disponivel", 1,0);
        jTable2.getModel().setValueAt("    Disponivel", 2,0);
        jTable2.getModel().setValueAt("    Disponivel", 3,0);
        jTable2.getModel().setValueAt("    Disponivel", 4,0);
        jTable2.getModel().setValueAt("    Disponivel", 5,0);
        jTable2.getModel().setValueAt("    Disponivel", 6,0);
        jTable2.getModel().setValueAt("    Disponivel", 7,0);
        jTable2.getModel().setValueAt("    Disponivel", 8,0);

        jTable2.getModel().setValueAt("    Disponivel", 0,1);
        jTable2.getModel().setValueAt("    Disponivel", 1,1);
        jTable2.getModel().setValueAt("    Disponivel", 2,1);
        jTable2.getModel().setValueAt("    Disponivel", 3,1);
        jTable2.getModel().setValueAt("    Disponivel", 4,1);
        jTable2.getModel().setValueAt("    Disponivel", 5,1);
        jTable2.getModel().setValueAt("    Disponivel", 6,1);
        jTable2.getModel().setValueAt("    Disponivel", 7,1);
        jTable2.getModel().setValueAt("    Disponivel", 8,1);

        jTable2.getModel().setValueAt("    Disponivel", 0,2);
        jTable2.getModel().setValueAt("    Disponivel", 1,2);
        jTable2.getModel().setValueAt("    Disponivel", 2,2);
        jTable2.getModel().setValueAt("    Disponivel", 3,2);
        jTable2.getModel().setValueAt("    Disponivel", 4,2);
        jTable2.getModel().setValueAt("    Disponivel", 5,2);
        jTable2.getModel().setValueAt("    Disponivel", 6,2);
        jTable2.getModel().setValueAt("    Disponivel", 7,2);
        jTable2.getModel().setValueAt("    Disponivel", 8,2);

        jTable2.getModel().setValueAt("    Disponivel", 0,3);
        jTable2.getModel().setValueAt("    Disponivel", 1,3);
        jTable2.getModel().setValueAt("    Disponivel", 2,3);
        jTable2.getModel().setValueAt("    Disponivel", 3,3);
        jTable2.getModel().setValueAt("    Disponivel", 4,3);
        jTable2.getModel().setValueAt("    Disponivel", 5,3);
        jTable2.getModel().setValueAt("    Disponivel", 6,3);
        jTable2.getModel().setValueAt("    Disponivel", 7,3);
        jTable2.getModel().setValueAt("    Disponivel", 8,3);

        jTable2.getModel().setValueAt("    Disponivel", 0,4);
        jTable2.getModel().setValueAt("    Disponivel", 1,4);
        jTable2.getModel().setValueAt("    Disponivel", 2,4);
        jTable2.getModel().setValueAt("    Disponivel", 3,4);
        jTable2.getModel().setValueAt("    Disponivel", 4,4);
        jTable2.getModel().setValueAt("    Disponivel", 5,4);
        jTable2.getModel().setValueAt("    Disponivel", 6,4);
        jTable2.getModel().setValueAt("    Disponivel", 7,4);
        jTable2.getModel().setValueAt("    Disponivel", 8,4);

    }//GEN-LAST:event_marcarMouseClicked

    private void desmarcarMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_desmarcarMouseClicked
        jTable2.getModel().setValueAt("", 0,0);
        jTable2.getModel().setValueAt("", 1,0);
        jTable2.getModel().setValueAt("", 2,0);
        jTable2.getModel().setValueAt("", 3,0);
        jTable2.getModel().setValueAt("", 4,0);
        jTable2.getModel().setValueAt("", 5,0);
        jTable2.getModel().setValueAt("", 6,0);
        jTable2.getModel().setValueAt("", 7,0);
        jTable2.getModel().setValueAt("", 8,0);

        jTable2.getModel().setValueAt("", 0,1);
        jTable2.getModel().setValueAt("", 1,1);
        jTable2.getModel().setValueAt("", 2,1);
        jTable2.getModel().setValueAt("", 3,1);
        jTable2.getModel().setValueAt("", 4,1);
        jTable2.getModel().setValueAt("", 5,1);
        jTable2.getModel().setValueAt("", 6,1);
        jTable2.getModel().setValueAt("", 7,1);
        jTable2.getModel().setValueAt("", 8,1);

        jTable2.getModel().setValueAt("", 0,2);
        jTable2.getModel().setValueAt("", 1,2);
        jTable2.getModel().setValueAt("", 2,2);
        jTable2.getModel().setValueAt("", 3,2);
        jTable2.getModel().setValueAt("", 4,2);
        jTable2.getModel().setValueAt("", 5,2);
        jTable2.getModel().setValueAt("", 6,2);
        jTable2.getModel().setValueAt("", 7,2);
        jTable2.getModel().setValueAt("", 8,2);

        jTable2.getModel().setValueAt("", 0,3);
        jTable2.getModel().setValueAt("", 1,3);
        jTable2.getModel().setValueAt("", 2,3);
        jTable2.getModel().setValueAt("", 3,3);
        jTable2.getModel().setValueAt("", 4,3);
        jTable2.getModel().setValueAt("", 5,3);
        jTable2.getModel().setValueAt("", 6,3);
        jTable2.getModel().setValueAt("", 7,3);
        jTable2.getModel().setValueAt("", 8,3);

        jTable2.getModel().setValueAt("", 0,4);
        jTable2.getModel().setValueAt("", 1,4);
        jTable2.getModel().setValueAt("", 2,4);
        jTable2.getModel().setValueAt("", 3,4);
        jTable2.getModel().setValueAt("", 4,4);
        jTable2.getModel().setValueAt("", 5,4);
        jTable2.getModel().setValueAt("", 6,4);
        jTable2.getModel().setValueAt("", 7,4);
        jTable2.getModel().setValueAt("", 8,4);

    }//GEN-LAST:event_desmarcarMouseClicked

    private void JLA1MouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_JLA1MouseClicked
        if("X".equals(JLA1.getText())){
            JLA1.setText("V");
            JLA1.setForeground(Color.GREEN);
        }else{
            JLA1.setText("X");
            JLA1.setForeground(Color.BLACK);
        }
    }//GEN-LAST:event_JLA1MouseClicked

    private void JLA3MouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_JLA3MouseClicked
        if("X".equals(JLA3.getText())){
            JLA3.setText("V");
            JLA3.setForeground(Color.GREEN);
        }else{
            JLA3.setText("X");
            JLA3.setForeground(Color.BLACK);
        }        // TODO add your handling code here:
    }//GEN-LAST:event_JLA3MouseClicked

    private void JLB1MouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_JLB1MouseClicked
        if("X".equals(JLB1.getText())){
            JLB1.setText("V");
            JLB1.setForeground(Color.GREEN);
        }else{
            JLB1.setText("X");
            JLB1.setForeground(Color.BLACK);
        }
    }//GEN-LAST:event_JLB1MouseClicked

    private void JLB2MouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_JLB2MouseClicked
        if("X".equals(JLB2.getText())){
            JLB2.setText("V");
            JLB2.setForeground(Color.GREEN);
        }else{
            JLB2.setText("X");
            JLB2.setForeground(Color.BLACK);
        }
    }//GEN-LAST:event_JLB2MouseClicked

    private void JLB3MouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_JLB3MouseClicked
        if("X".equals(JLB3.getText())){
            JLB3.setText("V");
            JLB3.setForeground(Color.GREEN);
        }else{
            JLB3.setText("X");
            JLB3.setForeground(Color.BLACK);
        }
    }//GEN-LAST:event_JLB3MouseClicked

    private void JLC2MouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_JLC2MouseClicked
        if("X".equals(JLC2.getText())){
            JLC2.setText("V");
            JLC2.setForeground(Color.GREEN);
        }else{
            JLC2.setText("X");
            JLC2.setForeground(Color.BLACK);
        }
    }//GEN-LAST:event_JLC2MouseClicked

    private void JLC3MouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_JLC3MouseClicked
        if("X".equals(JLC3.getText())){
            JLC3.setText("V");
            JLC3.setForeground(Color.GREEN);
        }else{
            JLC3.setText("X");
            JLC3.setForeground(Color.BLACK);
        }
    }//GEN-LAST:event_JLC3MouseClicked

    private void JLC1MouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_JLC1MouseClicked
        if("X".equals(JLC1.getText())){
            JLC1.setText("V");
            JLC1.setForeground(Color.GREEN);
        }else{
            JLC1.setText("X");
            JLC1.setForeground(Color.BLACK);
        }
    }//GEN-LAST:event_JLC1MouseClicked

    private void JLD3MouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_JLD3MouseClicked
        if("X".equals(JLD3.getText())){
            JLD3.setText("V");
            JLD3.setForeground(Color.GREEN);
        }else{
            JLD3.setText("X");
            JLD3.setForeground(Color.BLACK);
        }
    }//GEN-LAST:event_JLD3MouseClicked

    private void JLD2MouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_JLD2MouseClicked
        if("X".equals(JLD2.getText())){
            JLD2.setText("V");
            JLD2.setForeground(Color.GREEN);
        }else{
            JLD2.setText("X");
            JLD2.setForeground(Color.BLACK);
        }
    }//GEN-LAST:event_JLD2MouseClicked

    private void JLD1MouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_JLD1MouseClicked
        if("X".equals(JLD1.getText())){
            JLD1.setText("V");
            JLD1.setForeground(Color.GREEN);
        }else{
            JLD1.setText("X");
            JLD1.setForeground(Color.BLACK);
        }
    }//GEN-LAST:event_JLD1MouseClicked

    private void JLE3MouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_JLE3MouseClicked
        if("X".equals(JLE3.getText())){
            JLE3.setText("V");
            JLE3.setForeground(Color.GREEN);
        }else{
            JLE3.setText("X");
            JLE3.setForeground(Color.BLACK);
        }
    }//GEN-LAST:event_JLE3MouseClicked

    private void JLE2MouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_JLE2MouseClicked
        if("X".equals(JLE2.getText())){
            JLE2.setText("V");
            JLE2.setForeground(Color.GREEN);
        }else{
            JLE2.setText("X");
            JLE2.setForeground(Color.BLACK);
        }
    }//GEN-LAST:event_JLE2MouseClicked

    private void JLE1MouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_JLE1MouseClicked
        if("X".equals(JLE1.getText())){
            JLE1.setText("V");
            JLE1.setForeground(Color.GREEN);
        }else{
            JLE1.setText("X");
            JLE1.setForeground(Color.BLACK);
        }
    }//GEN-LAST:event_JLE1MouseClicked

    private void JLF3MouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_JLF3MouseClicked
        if("X".equals(JLF3.getText())){
            JLF3.setText("V");
            JLF3.setForeground(Color.GREEN);
        }else{
            JLF3.setText("X");
            JLF3.setForeground(Color.BLACK);
        }
    }//GEN-LAST:event_JLF3MouseClicked

    private void JLF1MouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_JLF1MouseClicked
        if("X".equals(JLF1.getText())){
            JLF1.setText("V");
            JLF1.setForeground(Color.GREEN);
        }else{
            JLF1.setText("X");
            JLF1.setForeground(Color.BLACK);
        }
    }//GEN-LAST:event_JLF1MouseClicked

    private void JLF2MouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_JLF2MouseClicked
        if("X".equals(JLF2.getText())){
            JLF2.setText("V");
            JLF2.setForeground(Color.GREEN);
        }else{
            JLF2.setText("X");
            JLF2.setForeground(Color.BLACK);
        }
    }//GEN-LAST:event_JLF2MouseClicked

    private void JLG3MouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_JLG3MouseClicked
        if("X".equals(JLG1.getText())){
            JLG3.setText("V");
            JLG3.setForeground(Color.GREEN);
        }else{
            JLG3.setText("X");
            JLG3.setForeground(Color.BLACK);
        }
    }//GEN-LAST:event_JLG3MouseClicked

    private void JLG2MouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_JLG2MouseClicked
        if("X".equals(JLG2.getText())){
            JLG2.setText("V");
            JLG2.setForeground(Color.GREEN);
        }else{
            JLG2.setText("X");
            JLG2.setForeground(Color.BLACK);
        }
    }//GEN-LAST:event_JLG2MouseClicked

    private void JLG1MouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_JLG1MouseClicked
        if("X".equals(JLG1.getText())){
            JLG1.setText("V");
            JLG1.setForeground(Color.GREEN);
        }else{
            JLG1.setText("X");
            JLG1.setForeground(Color.BLACK);
        }
    }//GEN-LAST:event_JLG1MouseClicked

    private void JLH1MouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_JLH1MouseClicked
        if("X".equals(JLH1.getText())){
            JLH1.setText("V");
            JLH1.setForeground(Color.GREEN);
        }else{
            JLH1.setText("X");
            JLH1.setForeground(Color.BLACK);
        }
    }//GEN-LAST:event_JLH1MouseClicked

    private void JLH2MouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_JLH2MouseClicked
        if("X".equals(JLH2.getText())){
            JLH2.setText("V");
            JLH2.setForeground(Color.GREEN);
        }else{
            JLH2.setText("X");
            JLH2.setForeground(Color.BLACK);
        }
    }//GEN-LAST:event_JLH2MouseClicked

    private void JLH3MouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_JLH3MouseClicked
        if("X".equals(JLH3.getText())){
            JLH3.setText("V");
            JLH3.setForeground(Color.GREEN);
        }else{
            JLH3.setText("X");
            JLH3.setForeground(Color.BLACK);
        }
    }//GEN-LAST:event_JLH3MouseClicked

    private void JLA2MouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_JLA2MouseClicked
        if("X".equals(JLA2.getText())){
            JLA2.setText("V");
            JLA2.setForeground(Color.GREEN);
        }else{
            JLA2.setText("X");
            JLA2.setForeground(Color.BLACK);
        }
    }//GEN-LAST:event_JLA2MouseClicked

    private void JLR_profMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_JLR_profMouseClicked
        EixoR_prof.setText("");
    }//GEN-LAST:event_JLR_profMouseClicked

    private void JLP_profMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_JLP_profMouseClicked
        EixoP_prof.setText("");
    }//GEN-LAST:event_JLP_profMouseClicked

    private void JLDisc2MouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_JLDisc2MouseClicked
       if(jRB_adicionar_prof.isSelected()){
         if(disc2_prof.getText().equals(d1)){d1="";Porenquanto.setM1("");}
         if(disc2_prof.getText().equals(d2)){d2="";Porenquanto.setM2("");}
         if(disc2_prof.getText().equals(d3)){d3="";Porenquanto.setM3("");}
         if(disc2_prof.getText().equals(d4)){d4="";Porenquanto.setM4("");}
         if(disc2_prof.getText().equals(d5)){d5="";Porenquanto.setM5("");}
         if(disc2_prof.getText().equals(d6)){d6="";Porenquanto.setM6("");}
         if(disc2_prof.getText().equals(d7)){d7="";Porenquanto.setM7("");}
         if(disc2_prof.getText().equals(d8)){d8="";Porenquanto.setM8("");}
         if(disc2_prof.getText().equals(d9)){d9="";Porenquanto.setM9("");}
         if(disc2_prof.getText().equals(d10)){d10="";Porenquanto.setM10("");}
         if(disc2_prof.getText().equals(d11)){d11="";Porenquanto.setM11("");}
         if(disc2_prof.getText().equals(d12)){d12="";Porenquanto.setM12("");}
         if(disc2_prof.getText().equals(d13)){d13="";Porenquanto.setM13("");}
         if(disc2_prof.getText().equals(d14)){d14="";Porenquanto.setM14("");}
         if(disc2_prof.getText().equals(d15)){d15="";Porenquanto.setM15("");}
         if(disc2_prof.getText().equals(d16)){d16="";Porenquanto.setM16("");}
         if(disc2_prof.getText().equals(d17)){d17="";Porenquanto.setM17("");}
         if(disc2_prof.getText().equals(d18)){d18="";Porenquanto.setM18("");}
         if(disc2_prof.getText().equals(d19)){d19="";Porenquanto.setM19("");}
         if(disc2_prof.getText().equals(d20)){d20="";Porenquanto.setM20("");}
         if(disc2_prof.getText().equals(d21)){d21="";Porenquanto.setM21("");}
         if(disc2_prof.getText().equals(d22)){d22="";Porenquanto.setM22("");}
         if(disc2_prof.getText().equals(d23)){d23="";Porenquanto.setM23("");}
         if(disc2_prof.getText().equals(d24)){d24="";Porenquanto.setM24("");}
         if(disc2_prof.getText().equals(d25)){d25="";Porenquanto.setM25("");}
         if(disc2_prof.getText().equals(d26)){d26="";Porenquanto.setM26("");}
        disc2_prof.setText("");
}else{
        disc2_prof.setText("Clique aqui para adicionar uma disciplina");
    }
    }//GEN-LAST:event_JLDisc2MouseClicked

    private void JLDisc3MouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_JLDisc3MouseClicked
       if(jRB_adicionar_prof.isSelected()){
         
         if(disc3_prof.getText().equals(d1)){d1="";Porenquanto.setM1("");}
         if(disc3_prof.getText().equals(d2)){d2="";Porenquanto.setM2("");}
         if(disc3_prof.getText().equals(d3)){d3="";Porenquanto.setM3("");}
         if(disc3_prof.getText().equals(d4)){d4="";Porenquanto.setM4("");}
         if(disc3_prof.getText().equals(d5)){d5="";Porenquanto.setM5("");}
         if(disc3_prof.getText().equals(d6)){d6="";Porenquanto.setM6("");}
         if(disc3_prof.getText().equals(d7)){d7="";Porenquanto.setM7("");}
         if(disc3_prof.getText().equals(d8)){d8="";Porenquanto.setM8("");}
         if(disc3_prof.getText().equals(d9)){d9="";Porenquanto.setM9("");}
         if(disc3_prof.getText().equals(d10)){d10="";Porenquanto.setM10("");}
         if(disc3_prof.getText().equals(d11)){d11="";Porenquanto.setM11("");}
         if(disc3_prof.getText().equals(d12)){d12="";Porenquanto.setM12("");}
         if(disc3_prof.getText().equals(d13)){d13="";Porenquanto.setM13("");}
         if(disc3_prof.getText().equals(d14)){d14="";Porenquanto.setM14("");}
         if(disc3_prof.getText().equals(d15)){d15="";Porenquanto.setM15("");}
         if(disc3_prof.getText().equals(d16)){d16="";Porenquanto.setM16("");}
         if(disc3_prof.getText().equals(d17)){d17="";Porenquanto.setM17("");}
         if(disc3_prof.getText().equals(d18)){d18="";Porenquanto.setM18("");}
         if(disc3_prof.getText().equals(d19)){d19="";Porenquanto.setM19("");}
         if(disc3_prof.getText().equals(d20)){d20="";Porenquanto.setM20("");}
         if(disc3_prof.getText().equals(d21)){d21="";Porenquanto.setM21("");}
         if(disc3_prof.getText().equals(d22)){d22="";Porenquanto.setM22("");}
         if(disc3_prof.getText().equals(d23)){d23="";Porenquanto.setM23("");}
         if(disc3_prof.getText().equals(d24)){d24="";Porenquanto.setM24("");}
         if(disc3_prof.getText().equals(d25)){d25="";Porenquanto.setM25("");}
         if(disc3_prof.getText().equals(d26)){d26="";Porenquanto.setM26("");}
         
         disc3_prof.setText("");
}else{
         disc3_prof.setText("Clique aqui para adicionar uma disciplina");
     }
    }//GEN-LAST:event_JLDisc3MouseClicked

    private void JLDisc4MouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_JLDisc4MouseClicked
       if(jRB_adicionar_prof.isSelected()){
             if(disc4_prof.getText().equals(d1)){d1="";Porenquanto.setM1("");}
         if(disc4_prof.getText().equals(d2)){d2="";Porenquanto.setM2("");}
         if(disc4_prof.getText().equals(d3)){d3="";Porenquanto.setM3("");}
         if(disc4_prof.getText().equals(d4)){d4="";Porenquanto.setM4("");}
         if(disc4_prof.getText().equals(d5)){d5="";Porenquanto.setM5("");}
         if(disc4_prof.getText().equals(d6)){d6="";Porenquanto.setM6("");}
         if(disc4_prof.getText().equals(d7)){d7="";Porenquanto.setM7("");}
         if(disc4_prof.getText().equals(d8)){d8="";Porenquanto.setM8("");}
         if(disc4_prof.getText().equals(d9)){d9="";Porenquanto.setM9("");}
         if(disc4_prof.getText().equals(d10)){d10="";Porenquanto.setM10("");}
         if(disc4_prof.getText().equals(d11)){d11="";Porenquanto.setM11("");}
         if(disc4_prof.getText().equals(d12)){d12="";Porenquanto.setM12("");}
         if(disc4_prof.getText().equals(d13)){d13="";Porenquanto.setM13("");}
         if(disc4_prof.getText().equals(d14)){d14="";Porenquanto.setM14("");}
         if(disc4_prof.getText().equals(d15)){d15="";Porenquanto.setM15("");}
         if(disc4_prof.getText().equals(d16)){d16="";Porenquanto.setM16("");}
         if(disc4_prof.getText().equals(d17)){d17="";Porenquanto.setM17("");}
         if(disc4_prof.getText().equals(d18)){d18="";Porenquanto.setM18("");}
         if(disc4_prof.getText().equals(d19)){d19="";Porenquanto.setM19("");}
         if(disc4_prof.getText().equals(d20)){d20="";Porenquanto.setM20("");}
         if(disc4_prof.getText().equals(d21)){d21="";Porenquanto.setM21("");}
         if(disc4_prof.getText().equals(d22)){d22="";Porenquanto.setM22("");}
         if(disc4_prof.getText().equals(d23)){d23="";Porenquanto.setM23("");}
         if(disc4_prof.getText().equals(d24)){d24="";Porenquanto.setM24("");}
         if(disc4_prof.getText().equals(d25)){d25="";Porenquanto.setM25("");}
         if(disc4_prof.getText().equals(d26)){d26="";Porenquanto.setM26("");}
    disc4_prof.setText("");
}else{
    disc4_prof.setText("Clique aqui para adicionar uma disciplina");
}       
    }//GEN-LAST:event_JLDisc4MouseClicked

    private void JLDisc1MouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_JLDisc1MouseClicked
       if(jRB_adicionar_prof.isSelected()){
             if(disc1_prof.getText().equals(d1)){d1="";Porenquanto.setM1("");}
         if(disc1_prof.getText().equals(d2)){d2="";Porenquanto.setM2("");}
         if(disc1_prof.getText().equals(d3)){d3="";Porenquanto.setM3("");}
         if(disc1_prof.getText().equals(d4)){d4="";Porenquanto.setM4("");}
         if(disc1_prof.getText().equals(d5)){d5="";Porenquanto.setM5("");}
         if(disc1_prof.getText().equals(d6)){d6="";Porenquanto.setM6("");}
         if(disc1_prof.getText().equals(d7)){d7="";Porenquanto.setM7("");}
         if(disc1_prof.getText().equals(d8)){d8="";Porenquanto.setM8("");}
         if(disc1_prof.getText().equals(d9)){d9="";Porenquanto.setM9("");}
         if(disc1_prof.getText().equals(d10)){d10="";Porenquanto.setM10("");}
         if(disc1_prof.getText().equals(d11)){d11="";Porenquanto.setM11("");}
         if(disc1_prof.getText().equals(d12)){d12="";Porenquanto.setM12("");}
         if(disc1_prof.getText().equals(d13)){d13="";Porenquanto.setM13("");}
         if(disc1_prof.getText().equals(d14)){d14="";Porenquanto.setM14("");}
         if(disc1_prof.getText().equals(d15)){d15="";Porenquanto.setM15("");}
         if(disc1_prof.getText().equals(d16)){d16="";Porenquanto.setM16("");}
         if(disc1_prof.getText().equals(d17)){d17="";Porenquanto.setM17("");}
         if(disc1_prof.getText().equals(d18)){d18="";Porenquanto.setM18("");}
         if(disc1_prof.getText().equals(d19)){d19="";Porenquanto.setM19("");}
         if(disc1_prof.getText().equals(d20)){d20="";Porenquanto.setM20("");}
         if(disc1_prof.getText().equals(d21)){d21="";Porenquanto.setM21("");}
         if(disc1_prof.getText().equals(d22)){d22="";Porenquanto.setM22("");}
         if(disc1_prof.getText().equals(d23)){d23="";Porenquanto.setM23("");}
         if(disc1_prof.getText().equals(d24)){d24="";Porenquanto.setM24("");}
         if(disc1_prof.getText().equals(d25)){d25="";Porenquanto.setM25("");}
         if(disc1_prof.getText().equals(d26)){d26="";Porenquanto.setM26("");}
    disc1_prof.setText("");
}else{
        disc1_prof.setText("Clique aqui para adicionar uma disciplina");
}
    }//GEN-LAST:event_JLDisc1MouseClicked

    private void buton_editar_profActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_buton_editar_profActionPerformed
        if(VerificaDadosCorretosALTDEL()){
            AlterarProfessor(id_deste);

        }else{
            JOptionPane.showMessageDialog(null, "Dados Incorretos");
        }
    }//GEN-LAST:event_buton_editar_profActionPerformed

    private void buton_adicionar_profActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_buton_adicionar_profActionPerformed
       if(VerificaDadosCorretos()){
            if(VerificaseaIgual()){
                CadatrarProfessor();
                JOptionPane.showMessageDialog(null, "Cadastrado com sucesso!");
                limpaDadosADD();
            }else{
                JOptionPane.showMessageDialog(null, "Este Professor ja se encontra cadastrado!");
            }
        }else{
            JOptionPane.showMessageDialog(null, "Dados Incorretos");
        }

    }//GEN-LAST:event_buton_adicionar_profActionPerformed

    private void buton_deletar_profActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_buton_deletar_profActionPerformed
        int resp = JOptionPane.showConfirmDialog(this, "Deseja realmente excluir este professor?",
            "Confirmação", JOptionPane.YES_NO_OPTION);

        if (resp == JOptionPane.YES_NO_OPTION) {
            try {
                profmet.DeletarProfessor(id_deste);
            } catch (SQLException ex) {
                Logger.getLogger(Menu3.class.getName()).log(Level.SEVERE, null, ex);
            }
            JOptionPane.showMessageDialog(null, "Excluído com sucesso!");
            buttonGroup1.clearSelection();
            DesabilitaALTDEL();
            DesabilitaADD();
        }

    }//GEN-LAST:event_buton_deletar_profActionPerformed

    private void jD_aula10WindowClosed(java.awt.event.WindowEvent evt) {//GEN-FIRST:event_jD_aula10WindowClosed
       
     
       
       
       
       
    }//GEN-LAST:event_jD_aula10WindowClosed

    private void jD_aula10WindowClosing(java.awt.event.WindowEvent evt) {//GEN-FIRST:event_jD_aula10WindowClosing
       jCheckBox111.setSelected(false);
       jCheckBox222.setSelected(false);
       jCheckBox333.setSelected(false);
       jCheckBox444.setSelected(false);
       jCheckBox555.setSelected(false);
       jCheckBox666.setSelected(false);
       jCheckBox777.setSelected(false);
       jCheckBox888.setSelected(false);
       jCheckBox999.setSelected(false);
       jCheckBox100.setSelected(false);
       jCheckBox110.setSelected(false);
       jCheckBox120.setSelected(false);
       jCheckBox130.setSelected(false);
       jCheckBox140.setSelected(false);
       jCheckBox150.setSelected(false);
       jCheckBox160.setSelected(false);
       jCheckBox170.setSelected(false);
       jCheckBox180.setSelected(false);
    }//GEN-LAST:event_jD_aula10WindowClosing

    private void jD_grade_curricularWindowClosing(java.awt.event.WindowEvent evt) {//GEN-FIRST:event_jD_grade_curricularWindowClosing
        jCheckBox1.setText("");
        jCheckBox2.setText("");
        jCheckBox3.setText("");
        jCheckBox4.setText("");
        jCheckBox5.setText("");
        jCheckBox6.setText("");
        jCheckBox7.setText("");
        jCheckBox8.setText("");
    }//GEN-LAST:event_jD_grade_curricularWindowClosing

    private void jD_grade_curricularWindowClosed(java.awt.event.WindowEvent evt) {//GEN-FIRST:event_jD_grade_curricularWindowClosed
       jCheckBox1.setText("");
        jCheckBox2.setText("");
        jCheckBox3.setText("");
        jCheckBox4.setText("");
        jCheckBox5.setText("");
        jCheckBox6.setText("");
        jCheckBox7.setText("");
        jCheckBox8.setText("");
    }//GEN-LAST:event_jD_grade_curricularWindowClosed

    private void JTF_Pesquisarmaterias1_prof1KeyReleased(java.awt.event.KeyEvent evt) {//GEN-FIRST:event_JTF_Pesquisarmaterias1_prof1KeyReleased
 AbilitaBuscarDiscReg();       
    }//GEN-LAST:event_JTF_Pesquisarmaterias1_prof1KeyReleased
private boolean VerificaDados() {
        int j=0;
        if(jCheckBox111.isSelected()){
            j++;
        }
        if(jCheckBox222.isSelected()){
            j++;
        }
        if(jCheckBox333.isSelected()){
            j++;
        }
        if(jCheckBox444.isSelected()){
            j++;
        }
        if(jCheckBox555.isSelected()){
            j++;
        }
        if(jCheckBox666.isSelected()){
            j++;
        }
        if(jCheckBox777.isSelected()){
            j++;
        }
        if(jCheckBox888.isSelected()){
            j++;
        }
        if(jCheckBox999.isSelected()){
            j++;
        }
        if(jCheckBox100.isSelected()){
            j++;
        }
        if(jCheckBox110.isSelected()){
            j++;
        }
        if(jCheckBox120.isSelected()){
            j++;
        }
        if(jCheckBox130.isSelected()){
            j++;
        }
        if(jCheckBox140.isSelected()){
            j++;
        }
        if(jCheckBox150.isSelected()){
            j++;
        }
        if(jCheckBox160.isSelected()){
            j++;
        }
        if(jCheckBox170.isSelected()){
            j++;
        }
        if(jCheckBox180.isSelected()){
            j++;
        }
        if(j>=5){
            return true;
        }else{
            return false;
        }
    }
    private boolean VerificaDisponibilidadedosProf() {
        ProfessorMet profmet=new ProfessorMet();
        if(profmet.VerificaPendencia()){
            return true;
        }else{
            return false;
        }
    }
private void Desabilita() {
         RB_manhaA.setVisible(false);
        RB_manhaB.setVisible(false);
        RB_manhaC.setVisible(false);
        RB_manhaD.setVisible(false);
        RB_manhaE.setVisible(false);
        RB_manhaF.setVisible(false);
        RB_manhaG.setVisible(false);
        RB_manhaH.setVisible(false);
        RB_tardeA.setVisible(false);
        RB_tardeB.setVisible(false);
        RB_tardeC.setVisible(false);
        RB_tardeD.setVisible(false);
        RB_tardeE.setVisible(false);
        RB_tardeF.setVisible(false);
        RB_tardeG.setVisible(false);
        RB_tardeH.setVisible(false);
        serieAA.setVisible(false);
        serieBB.setVisible(false);
        serieCC.setVisible(false);
        serieDD.setVisible(false);
        serieEE.setVisible(false);
        serieFF.setVisible(false);
        serieGG.setVisible(false);
        serieHH.setVisible(false);
        jSeparator55.setVisible(false);
        jSeparator11.setVisible(false);
        jSeparator22.setVisible(false);
        jSeparator33.setVisible(false);
        jSeparator66.setVisible(false);
        jSeparator77.setVisible(false);
        jSeparator88.setVisible(false);
        jSeparator44.setVisible(false);
    }

    private void SerieTurma()  {
        SerieMet sm = new SerieMet();
        Serie s = new Serie();
        try {
            listaserie = sm.getList3();
        } catch (SQLException ex) {
            Logger.getLogger(Menu3.class.getName()).log(Level.SEVERE, null, ex);
        }
        nome_turma = new String [listaserie.size()];
        int i=0;

        while(listaserie.size()>i){
        s = listaserie.get(i);
        nome_turma[i] = s.getTurma();
        System.out.println("nome: " + nome_turma[i]);
        i++;
        }
    for( i=0;listaserie.size()>i;i++){
        if( "A".equals(nome_turma[i])){
        serieextra.setVisible(true);
        serieAA.setVisible(true);
        RB_manhaA.setVisible(true);
        RB_tardeA.setVisible(true);
        jSeparator11.setVisible(true);
        }if("B".equals(nome_turma[i])){ 
        serieextra.setVisible(true);
        serieBB.setVisible(true);
        RB_manhaB.setVisible(true);
        RB_tardeB.setVisible(true);
        jSeparator22.setVisible(true);
        }if("C".equals(nome_turma[i])){
        
        serieextra.setVisible(true);
        serieCC.setVisible(true);
        RB_manhaC.setVisible(true);
        RB_tardeC.setVisible(true);
        jSeparator33.setVisible(true);
        }if("D".equals(nome_turma[i])){
        
        serieextra.setVisible(true);
        serieDD.setVisible(true);
        RB_manhaD.setVisible(true);
        RB_tardeD.setVisible(true);
        jSeparator44.setVisible(true);
        }if("E".equals(nome_turma[i])){
        serieextra.setVisible(true);
        serieEE.setVisible(true);
        RB_manhaE.setVisible(true);
        RB_tardeE.setVisible(true);
        jSeparator55.setVisible(true);
        }if("F".equals(nome_turma[i])){  
        serieextra.setVisible(true);
        serieFF.setVisible(true);
        RB_manhaF.setVisible(true);
        RB_tardeF.setVisible(true);
        jSeparator66.setVisible(true);
        }
        if("G".equals(nome_turma[i])){  
        serieextra.setVisible(true);
        serieGG.setVisible(true);
        RB_manhaG.setVisible(true);
        RB_tardeG.setVisible(true);
        jSeparator77.setVisible(true);
        }
        if("H".equals(nome_turma[i])){  
        serieextra.setVisible(true);
        serieHH.setVisible(true);
        RB_manhaH.setVisible(true);
        RB_tardeH.setVisible(true);
        jSeparator88.setVisible(true);
        }
    }
    }
     private void VerificaQuantHA_est() {
        int ha = 0;
        try {
            ha = objmet.VerificaQuatdeHA();
        } catch (SQLException ex) {
            Logger.getLogger(Menu3.class.getName()).log(Level.SEVERE, null, ex);
        }
        
        int soma=0;
        int aulaextra=0;
        if(buttonGroup1.getSelection()!=null){
            String b=turnoA;
            if("Manhã".equals(b)){
              soma=soma+25;  
              aulaextra=aulaextra+1;
            }else{
              soma=soma+20;  
            }
        }
        if(buttonGroup2.getSelection()!=null){
            String b=turnoB;
            if("Manhã".equals(b)){
              soma=soma+25;  
              aulaextra=aulaextra+1;
            }else{
              soma=soma+20;  
            }
        }
        if(buttonGroup3.getSelection()!=null){
            System.out.println("ouo");
            String b=turnoC;
            if("Manhã".equals(b)){
              soma=soma+25;  
              aulaextra=aulaextra+1;
            }else{
              soma=soma+20;  
            }
        }
        if(buttonGroup4.getSelection()!=null){
            String b=turnoD;
            if("Manhã".equals(b)){
              soma=soma+25; 
              aulaextra=aulaextra+1;
            }else{
              soma=soma+20;  
            }
        }
        if(buttonGroup5.getSelection()!=null){
            String b=turnoE;
            if("Manhã".equals(b)){
              soma=soma+25;  
              aulaextra=aulaextra+1;
            }else{
              soma=soma+20;  
            }
        }
        if(buttonGroup6.getSelection()!=null){
            String b=turnoF;
            if("Manhã".equals(b)){
              soma=soma+25;  
              aulaextra=aulaextra+1;
            }else{
              soma=soma+20;  
            }
        }
        if(buttonGroup7.getSelection()!=null){
            String b=turnoG;
            if("Manhã".equals(b)){
              soma=soma+25;  
              aulaextra=aulaextra+1;
            }else{
              soma=soma+20;  
            }
        }
        if(buttonGroup8.getSelection()!=null){
            String b=turnoH;
            if("Manhã".equals(b)){
              soma=soma+25;  
              aulaextra=aulaextra+1;
            }else{
              soma=soma+20;  
            }
        }
        int HAObrigatoria=0;
        int j;
        j=seriemet.BuscarQuantdeSerie();
        int aulas=(45*j)+(aulaextra*5);
        HAObrigatoria=aulas-soma;
        if(HAObrigatoria==ha){
            System.out.println(turnoC);
          if("Manhã".equals(turnoA) || "Manhã".equals(turnoB) || "Manhã".equals(turnoC) || "Manhã".equals(turnoD)|| "Manhã".equals(turnoE)|| "Manhã".equals(turnoF)|| "Manhã".equals(turnoG)|| "Manhã".equals(turnoH)){
         jCheckBox111.setSelected(false);
       jCheckBox222.setSelected(false);
       jCheckBox333.setSelected(false);
       jCheckBox444.setSelected(false);
       jCheckBox555.setSelected(false);
       jCheckBox666.setSelected(false);
       jCheckBox777.setSelected(false);
       jCheckBox888.setSelected(false);
       jCheckBox999.setSelected(false);
       jCheckBox100.setSelected(false);
       jCheckBox110.setSelected(false);
       jCheckBox120.setSelected(false);
       jCheckBox130.setSelected(false);
       jCheckBox140.setSelected(false);
       jCheckBox150.setSelected(false);
       jCheckBox160.setSelected(false);
       jCheckBox170.setSelected(false);
       jCheckBox180.setSelected(false);
              java.awt.Dimension screenSize = java.awt.Toolkit.getDefaultToolkit().getScreenSize();
         AddNomeProf();
        jD_aula10 .setBounds((screenSize.width-656)/2, (screenSize.height-434)/2, 656, 434);
        jD_aula10.setVisible(true);
        jD_addestagio.setVisible(false);
        }else{
              jD_addestagio.setVisible(false);
              dispose();
             java.awt.EventQueue.invokeLater(new Runnable() {

            @Override
            public void run() {
                new Aguarde2().setVisible(true);
            }
        });
        }
        
        }else if(HAObrigatoria>ha){
            int sub=HAObrigatoria-ha;
            JOptionPane.showMessageDialog(null, "Retorne a tela de Hora Aula e adicione mais "+sub+" horas aula");
        }else{
         int sm=ha-HAObrigatoria;
            JOptionPane.showMessageDialog(null, "Retorne a tela de Hora Aula e delete "+sm+" horas aula");
           
        }
    }
      private void AddNomeProf() {
        String[] a,b,c,d,e,f,g,h;
        
         a=EstagiosTabela.getEstagioA();
         b=EstagiosTabela.getEstagioB();
         c=EstagiosTabela.getEstagioC();
         d=EstagiosTabela.getEstagioD();
         e=EstagiosTabela.getEstagioE();
         f=EstagiosTabela.getEstagioF();
         g=EstagiosTabela.getEstagioG();
         h=EstagiosTabela.getEstagioH();
        if("Tarde".equals(a[1])){
          a[2]=""; 
        }
        if("Tarde".equals(b[1])){
          b[2]=""; 
        }
        if("Tarde".equals(c[1])){
          c[2]=""; 
        }
        if("Tarde".equals(c[1])){
          d[2]=""; 
        }
        if("Tarde".equals(c[1])){
          e[2]=""; 
        }
        if("Tarde".equals(c[1])){
          f[2]=""; 
        }
        if("Tarde".equals(c[1])){
          g[2]=""; 
        }
        if("Tarde".equals(c[1])){
          h[2]=""; 
        }
        List Nomes = null;
        
        try {
                     Nomes= profdiscmet.BuscarDisciplinasProf(a[2],b[2],c[2],d[2],e[2],f[2],g[2],h[2]);
                } catch (SQLException ex) {
                    Logger.getLogger(Menu3.class.getName()).log(Level.SEVERE, null, ex);
                }
        if(!Nomes.isEmpty()){
 String[] obj = new String[20];
for(int asd=0;Nomes.size()>asd;asd++){
    obj[asd]=Nomes.get(asd).toString();
    
}
if(obj[0]!=null){
    jCheckBox111.setText(obj[0]);
}
if(obj[1]!=null){
    jCheckBox222.setText(obj[1]);
}
if(obj[2]!=null){
    jCheckBox333.setText(obj[2]);
}
if(obj[3]!=null){
    jCheckBox444.setText(obj[3]);
}
if(obj[4]!=null){
    jCheckBox555.setText(obj[4]);
}
if(obj[5]!=null){
    jCheckBox666.setText(obj[5]);
}
if(obj[6]!=null){
    jCheckBox777.setText(obj[6]);
}
if(obj[7]!=null){
    jCheckBox888.setText(obj[7]);
}
if(obj[8]!=null){
    jCheckBox999.setText(obj[8]);
}
if(obj[9]!=null){
    jCheckBox100.setText(obj[9]);
}
if(obj[10]!=null){
    jCheckBox110.setText(obj[10]);
}if(obj[11]!=null){
    jCheckBox120.setText(obj[11]);
}
if(obj[12]!=null){
    jCheckBox130.setText(obj[12]);
}
if(obj[13]!=null){
    jCheckBox140.setText(obj[13]);
}
if(obj[14]!=null){
    jCheckBox150.setText(obj[14]);
}
if(obj[15]!=null){
    jCheckBox160.setText(obj[15]);
}
if(obj[16]!=null){
    jCheckBox170.setText(obj[16]);
}
if(obj[17]!=null){
    jCheckBox180.setText(obj[17]);
}


        }else{
            System.out.println("lista vazia");
        } 
if("".equals(jCheckBox111.getText())){
    jCheckBox111.setVisible(false);
}
if("".equals(jCheckBox222.getText())){
    jCheckBox222.setVisible(false);
}
if("".equals(jCheckBox333.getText())){
    jCheckBox333.setVisible(false);
}
if("".equals(jCheckBox444.getText())){
    jCheckBox444.setVisible(false);
}
if("".equals(jCheckBox555.getText())){
    jCheckBox555.setVisible(false);
}
if("".equals(jCheckBox666.getText())){
    jCheckBox666.setVisible(false);
}
if("".equals(jCheckBox777.getText())){
    jCheckBox777.setVisible(false);
}
if("".equals(jCheckBox888.getText())){
    jCheckBox888.setVisible(false);
}
if("".equals(jCheckBox999.getText())){
    jCheckBox999.setVisible(false);
}
if("".equals(jCheckBox100.getText())){
    jCheckBox100.setVisible(false);
}
if("".equals(jCheckBox110.getText())){
    jCheckBox110.setVisible(false);
}
if("".equals(jCheckBox120.getText())){
    jCheckBox120.setVisible(false);
}
if("".equals(jCheckBox130.getText())){
    jCheckBox130.setVisible(false);
}
if("".equals(jCheckBox140.getText())){
    jCheckBox140.setVisible(false);
}
if("".equals(jCheckBox150.getText())){
    jCheckBox150.setVisible(false);
}
if("".equals(jCheckBox160.getText())){
    jCheckBox160.setVisible(false);
}
if("".equals(jCheckBox170.getText())){
    jCheckBox170.setVisible(false);
}
if("".equals(jCheckBox180.getText())){
    jCheckBox180.setVisible(false);
}
    }

    private void AlocarCurso() {
String a666="",b666="",c666="",d666="",e666="",f666="",g666="",h666="";
String v666[]={a666,b666,c666,d666,e666,f666,g666,h666};
         String[] cursos = cursomet.Buscar_Nome_Cursos();
         for(int i=0;i<cursos.length;i++){
           v666[i]=cursos[i];  
         }
         jCheckBox1.setText(v666[0]);
         jCheckBox2.setText(v666[1]);
         jCheckBox3.setText(v666[2]);
         jCheckBox4.setText(v666[3]);
         jCheckBox5.setText(v666[4]);
         jCheckBox6.setText(v666[5]);
         jCheckBox7.setText(v666[6]);
         jCheckBox8.setText(v666[7]);
         if("".equals(jCheckBox1.getText())){
             jCheckBox1.setVisible(false);
         }
         if("".equals(jCheckBox2.getText())){
             jCheckBox2.setVisible(false);
         }
         if("".equals(jCheckBox3.getText())){
             jCheckBox3.setVisible(false);
         }
         if("".equals(jCheckBox4.getText())){
             jCheckBox4.setVisible(false);
         }
         if("".equals(jCheckBox5.getText())){
             jCheckBox5.setVisible(false);
         }
         if("".equals(jCheckBox6.getText())){
             jCheckBox6.setVisible(false);
         }
         if("".equals(jCheckBox7.getText())){
             jCheckBox7.setVisible(false);
         }
         if("".equals(jCheckBox8.getText())){
             jCheckBox8.setVisible(false);
         }
        
         
    }
    private void VerificaQuantHA() {
    ObjetoMet objmet= new ObjetoMet();
    SerieMet seriemet = new SerieMet();
        int ha = 0;
        try {
            ha = objmet.VerificaQuatdeHA();
        } catch (SQLException ex) {
            Logger.getLogger(Menu3.class.getName()).log(Level.SEVERE, null, ex);
        }
       
        
        int HAObrigatoria=0;
        int j;
        j=seriemet.BuscarQuantdeSerie();
        int aulas=45*j;
        HAObrigatoria=aulas;
        if(HAObrigatoria==ha){
          
          jD_sn.setVisible(false);
          dispose();
        java.awt.EventQueue.invokeLater(new Runnable() {

            @Override
            public void run() {
                new Aguarde2().setVisible(true);
            }
        });    
            
        
      
       
        }else if(HAObrigatoria>ha){
            int sub=HAObrigatoria-ha;
            JOptionPane.showMessageDialog(null, "Retorne a tela de Horas Aulas e adicione mais "+sub+" horas aula");
        }else{
         int sm=ha-HAObrigatoria;
            JOptionPane.showMessageDialog(null, "Retorne a tela de Horas Aulas e delete "+sm+" horas aula");
           
        }
    }
    /**
     * @param args the command line arguments
     */
    public static void main(String args[]) {
        /*
         * Set the Nimbus look and feel
         */
        //<editor-fold defaultstate="collapsed" desc=" Look and feel setting code (optional) ">
        /*
         * If Nimbus (introduced in Java SE 6) is not available, stay with the
         * default look and feel. For details see
         * http://download.oracle.com/javase/tutorial/uiswing/lookandfeel/plaf.html
         */
        try {
            for (javax.swing.UIManager.LookAndFeelInfo info : javax.swing.UIManager.getInstalledLookAndFeels()) {
                if ("Nimbus".equals(info.getName())) {
                    javax.swing.UIManager.setLookAndFeel(info.getClassName());
                    break;
                }
            }
        } catch (ClassNotFoundException | InstantiationException | IllegalAccessException | javax.swing.UnsupportedLookAndFeelException ex) {
            java.util.logging.Logger.getLogger(Menu3.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        }
        //</editor-fold>

        /*
         * Create and display the form
         */
        java.awt.EventQueue.invokeLater(new Runnable() {

            @Override
            public void run() {
                new Menu3().setVisible(true);
            }
        });
    }
    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JComboBox CB_Professor_ha;
    private javax.swing.JTextField EixoP_prof;
    private javax.swing.JTextField EixoR_prof;
    private javax.swing.JLabel JLA1;
    private javax.swing.JLabel JLA2;
    private javax.swing.JLabel JLA3;
    private javax.swing.JLabel JLB1;
    private javax.swing.JLabel JLB2;
    private javax.swing.JLabel JLB3;
    private javax.swing.JLabel JLC1;
    private javax.swing.JLabel JLC2;
    private javax.swing.JLabel JLC3;
    private javax.swing.JLabel JLD1;
    private javax.swing.JLabel JLD2;
    private javax.swing.JLabel JLD3;
    private javax.swing.JLabel JLDisc1;
    private javax.swing.JLabel JLDisc2;
    private javax.swing.JLabel JLDisc3;
    private javax.swing.JLabel JLDisc4;
    private javax.swing.JLabel JLDisc5_prof;
    private javax.swing.JLabel JLE1;
    private javax.swing.JLabel JLE2;
    private javax.swing.JLabel JLE3;
    private javax.swing.JLabel JLF1;
    private javax.swing.JLabel JLF2;
    private javax.swing.JLabel JLF3;
    private javax.swing.JLabel JLG1;
    private javax.swing.JLabel JLG2;
    private javax.swing.JLabel JLG3;
    private javax.swing.JLabel JLH1;
    private javax.swing.JLabel JLH2;
    private javax.swing.JLabel JLH3;
    private javax.swing.JLabel JLP_prof;
    private javax.swing.JLabel JLR_prof;
    private javax.swing.JTextField JTF_Pesquisar2_ha;
    private javax.swing.JTextField JTF_Pesquisar_prof;
    private javax.swing.JTextField JTF_Pesquisarmaterias1_prof;
    private javax.swing.JTextField JTF_Pesquisarmaterias1_prof1;
    private javax.swing.JTextField JTF_Pesquisarmaterias_prof;
    private javax.swing.JRadioButton RB_Materia_ha;
    private javax.swing.JRadioButton RB_Professor_ha;
    private javax.swing.JRadioButton RB_manhaA;
    private javax.swing.JRadioButton RB_manhaB;
    private javax.swing.JRadioButton RB_manhaC;
    private javax.swing.JRadioButton RB_manhaD;
    private javax.swing.JRadioButton RB_manhaE;
    private javax.swing.JRadioButton RB_manhaF;
    private javax.swing.JRadioButton RB_manhaG;
    private javax.swing.JRadioButton RB_manhaH;
    private javax.swing.JRadioButton RB_tardeA;
    private javax.swing.JRadioButton RB_tardeB;
    private javax.swing.JRadioButton RB_tardeC;
    private javax.swing.JRadioButton RB_tardeD;
    private javax.swing.JRadioButton RB_tardeE;
    private javax.swing.JRadioButton RB_tardeF;
    private javax.swing.JRadioButton RB_tardeG;
    private javax.swing.JRadioButton RB_tardeH;
    private javax.swing.JButton buton_adicionar_curso;
    private javax.swing.JButton buton_adicionar_disc;
    private javax.swing.JButton buton_adicionar_prof;
    private javax.swing.JButton buton_adicionar_serie;
    private javax.swing.JButton buton_deletar_curso;
    private javax.swing.JButton buton_deletar_disc;
    private javax.swing.JButton buton_deletar_prof;
    private javax.swing.JButton buton_deletar_serie;
    private javax.swing.JButton buton_editar_curso;
    private javax.swing.JButton buton_editar_disc;
    private javax.swing.JButton buton_editar_prof;
    private javax.swing.ButtonGroup buttonGroup1;
    private javax.swing.ButtonGroup buttonGroup2;
    private javax.swing.ButtonGroup buttonGroup3;
    private javax.swing.ButtonGroup buttonGroup4;
    private javax.swing.ButtonGroup buttonGroup5;
    private javax.swing.ButtonGroup buttonGroup6;
    private javax.swing.ButtonGroup buttonGroup7;
    private javax.swing.ButtonGroup buttonGroup8;
    private javax.swing.JLabel desmarcar;
    private javax.swing.JTextField disc1_prof;
    private javax.swing.JTextField disc2_prof;
    private javax.swing.JTextField disc3_prof;
    private javax.swing.JTextField disc4_prof;
    private javax.swing.JTextField disc5_prof;
    private javax.swing.JButton jB_curso;
    private javax.swing.JButton jB_disciplina;
    private javax.swing.JButton jB_ha;
    private javax.swing.JButton jB_layout;
    private javax.swing.JButton jB_prof;
    private javax.swing.JButton jB_relatorio;
    private javax.swing.JButton jB_serie;
    private javax.swing.JButton jButton10;
    private javax.swing.JButton jButton11;
    private javax.swing.JButton jButton12;
    private javax.swing.JButton jButton13;
    private javax.swing.JButton jButton14;
    private javax.swing.JButton jButton15;
    private javax.swing.JButton jButton16;
    private javax.swing.JButton jButton8;
    private javax.swing.JButton jButton9;
    private javax.swing.JButton jButton_gc;
    private javax.swing.JButton jButton_horario;
    private javax.swing.JComboBox jCB_ano_ha;
    private javax.swing.JComboBox jCB_curso1_curso;
    private javax.swing.JComboBox jCB_curso1_disc;
    private javax.swing.JComboBox jCB_curso_curso;
    private javax.swing.JComboBox jCB_curso_disc;
    private javax.swing.JComboBox jCB_curso_serie;
    private javax.swing.JComboBox jCB_cursoalt_disc;
    private javax.swing.JComboBox jCB_descricao1_curso;
    private javax.swing.JComboBox jCB_descricao1_ha;
    private javax.swing.JComboBox jCB_descricao_curso;
    private javax.swing.JComboBox jCB_descricao_ha;
    private javax.swing.JComboBox jCB_descricao_serie;
    private javax.swing.JComboBox jCB_disciplina_ha;
    private javax.swing.JCheckBox jCheckBox1;
    private javax.swing.JCheckBox jCheckBox100;
    private javax.swing.JCheckBox jCheckBox110;
    private javax.swing.JCheckBox jCheckBox111;
    private javax.swing.JCheckBox jCheckBox120;
    private javax.swing.JCheckBox jCheckBox130;
    private javax.swing.JCheckBox jCheckBox140;
    private javax.swing.JCheckBox jCheckBox150;
    private javax.swing.JCheckBox jCheckBox160;
    private javax.swing.JCheckBox jCheckBox170;
    private javax.swing.JCheckBox jCheckBox180;
    private javax.swing.JCheckBox jCheckBox2;
    private javax.swing.JCheckBox jCheckBox222;
    private javax.swing.JCheckBox jCheckBox3;
    private javax.swing.JCheckBox jCheckBox333;
    private javax.swing.JCheckBox jCheckBox4;
    private javax.swing.JCheckBox jCheckBox444;
    private javax.swing.JCheckBox jCheckBox5;
    private javax.swing.JCheckBox jCheckBox555;
    private javax.swing.JCheckBox jCheckBox6;
    private javax.swing.JCheckBox jCheckBox666;
    private javax.swing.JCheckBox jCheckBox7;
    private javax.swing.JCheckBox jCheckBox777;
    private javax.swing.JCheckBox jCheckBox8;
    private javax.swing.JCheckBox jCheckBox888;
    private javax.swing.JCheckBox jCheckBox999;
    private javax.swing.JDialog jD_addestagio;
    private javax.swing.JDialog jD_aula10;
    private javax.swing.JDialog jD_esc_rel;
    private javax.swing.JDialog jD_grade_curricular;
    private javax.swing.JDialog jD_salva;
    private javax.swing.JDialog jD_sn;
    private javax.swing.JDesktopPane jDesktopPane1;
    private javax.swing.JDesktopPane jDesktopPane1_prof;
    private javax.swing.JDesktopPane jDesktopPane2;
    private javax.swing.JDesktopPane jDesktopPane3;
    private javax.swing.JDesktopPane jDesktopPane4;
    private javax.swing.JDesktopPane jDesktopPane5;
    private javax.swing.JDesktopPane jDesktopPane6;
    private javax.swing.JDesktopPane jDesktopPane7;
    private javax.swing.JDesktopPane jDesktopPane8;
    private javax.swing.JDialog jDialog1;
    private javax.swing.JDialog jDialog2;
    private javax.swing.JDialog jDialog3;
    private javax.swing.JDialog jDialog4;
    private javax.swing.JFileChooser jFileChooser1;
    private javax.swing.JButton jL_adicionar_ha;
    private javax.swing.JButton jL_deletar1_ha;
    private javax.swing.JButton jL_deletar_ha;
    private javax.swing.JButton jL_editar_ha;
    private javax.swing.JButton jL_ok_disc;
    private javax.swing.JLabel jLabel1;
    private javax.swing.JButton jLabel1_ha;
    private javax.swing.JLabel jLabel1_sgh;
    private javax.swing.JLabel jLabel2;
    private javax.swing.JLabel jLabel2_disc;
    private javax.swing.JButton jLabel2_ha;
    private javax.swing.JLabel jLabel2_prof;
    private javax.swing.JButton jLabel3_ha;
    private javax.swing.JButton jLabel4_ha;
    private javax.swing.JPanel jPanel1;
    private javax.swing.JPanel jPanel10;
    private javax.swing.JPanel jPanel11;
    private javax.swing.JPanel jPanel12;
    private javax.swing.JPanel jPanel13;
    private javax.swing.JPanel jPanel14;
    private javax.swing.JPanel jPanel1_prof;
    private javax.swing.JPanel jPanel2;
    private javax.swing.JPanel jPanel3;
    private javax.swing.JPanel jPanel4;
    private javax.swing.JPanel jPanel5;
    private javax.swing.JPanel jPanel6;
    private javax.swing.JPanel jPanel7;
    private javax.swing.JPanel jPanel8;
    private javax.swing.JPanel jPanel9;
    private javax.swing.JPanel jPanel_curso;
    private javax.swing.JPanel jPanel_disciplina;
    private javax.swing.JPanel jPanel_hora_aula;
    private javax.swing.JPanel jPanel_prof;
    private javax.swing.JPanel jPanel_serie;
    private javax.swing.JRadioButton jRB_1_ha;
    private javax.swing.JRadioButton jRB_1_serie;
    private javax.swing.JRadioButton jRB_2_ha;
    private javax.swing.JRadioButton jRB_2_serie;
    private javax.swing.JRadioButton jRB_3_ha;
    private javax.swing.JRadioButton jRB_3_serie;
    private javax.swing.JRadioButton jRB_adicionar_curso;
    private javax.swing.JRadioButton jRB_adicionar_disc;
    private javax.swing.JRadioButton jRB_adicionar_ha;
    private javax.swing.JRadioButton jRB_adicionar_prof;
    private javax.swing.JRadioButton jRB_adicionar_serie;
    private javax.swing.JRadioButton jRB_deletar_curso;
    private javax.swing.JRadioButton jRB_deletar_ha;
    private javax.swing.JRadioButton jRB_deletar_serie;
    private javax.swing.JRadioButton jRB_editar_curso;
    private javax.swing.JRadioButton jRB_edt_del_disc;
    private javax.swing.JRadioButton jRB_edt_del_prof;
    private javax.swing.JRadioButton jRB_profissional_disc;
    private javax.swing.JRadioButton jRB_profissional_prof;
    private javax.swing.JRadioButton jRB_profissionalalt_disc;
    private javax.swing.JRadioButton jRB_regular_disc;
    private javax.swing.JRadioButton jRB_regular_prof;
    private javax.swing.JRadioButton jRB_regularalt_disc;
    private javax.swing.JRadioButton jRB_visualizar_disc;
    private javax.swing.JRadioButton jRB_visualizar_ha;
    private javax.swing.JScrollPane jScrollPane1;
    private javax.swing.JScrollPane jScrollPane1_prof;
    private javax.swing.JScrollPane jScrollPane2;
    private javax.swing.JScrollPane jScrollPane2_prof;
    private javax.swing.JScrollPane jScrollPane3;
    private javax.swing.JScrollPane jScrollPane3_prof;
    private javax.swing.JScrollPane jScrollPane4;
    private javax.swing.JScrollPane jScrollPane4_prof;
    private javax.swing.JScrollPane jScrollPane5;
    private javax.swing.JScrollPane jScrollPane5_prof;
    private javax.swing.JScrollPane jScrollPane5_prof1;
    private javax.swing.JSeparator jSeparator1;
    private javax.swing.JSeparator jSeparator11;
    private javax.swing.JSeparator jSeparator1_curso;
    private javax.swing.JSeparator jSeparator1_disc;
    private javax.swing.JSeparator jSeparator1_ha;
    private javax.swing.JSeparator jSeparator1_prof;
    private javax.swing.JSeparator jSeparator1_serie;
    private javax.swing.JSeparator jSeparator2;
    private javax.swing.JSeparator jSeparator22;
    private javax.swing.JSeparator jSeparator3;
    private javax.swing.JSeparator jSeparator33;
    private javax.swing.JSeparator jSeparator4;
    private javax.swing.JSeparator jSeparator44;
    private javax.swing.JSeparator jSeparator5;
    private javax.swing.JSeparator jSeparator55;
    private javax.swing.JSeparator jSeparator6;
    private javax.swing.JSeparator jSeparator66;
    private javax.swing.JSeparator jSeparator7;
    private javax.swing.JSeparator jSeparator77;
    private javax.swing.JSeparator jSeparator88;
    private javax.swing.JTextField jTF_Carga_horaria_prof;
    private javax.swing.JTextField jTF_cursonovo_curso;
    private javax.swing.JTextField jTF_descricao_curso;
    private javax.swing.JTextField jTF_descricaonovo_curso;
    private javax.swing.JTextField jTF_horaaula_ha;
    private javax.swing.JTextField jTF_nome_prof;
    private javax.swing.JTextField jTF_nomecurso_curso;
    private javax.swing.JTextField jTF_nomedisc_disc;
    private javax.swing.JTextField jTF_nomediscalt_disc;
    private javax.swing.JTextField jTF_pesquisar_disc;
    private javax.swing.JTextField jTF_totalHA_ha;
    private javax.swing.JTable jTTabela_Disc1_prof;
    private javax.swing.JTable jTTabela_Disc2;
    private javax.swing.JTable jTTabela_Disc_prof;
    private javax.swing.JTable jTTabela_Disc_prof_reg;
    private javax.swing.JTable jTTabela_HA2;
    private javax.swing.JTable jTTabela_Prof_prof;
    private javax.swing.JTable jTTabela_Serie;
    private javax.swing.JTable jTTable_disc;
    private javax.swing.JTable jTTable_hora_aula;
    private javax.swing.JTable jTable1;
    private javax.swing.JTable jTable2;
    private javax.swing.JLabel jl_Pesquisar1_prof;
    private javax.swing.JLabel jl_Pesquisar2_prof;
    private javax.swing.JLabel jl_Pesquisar2_prof1;
    private javax.swing.JLabel jl_Pesquisar_prof;
    private javax.swing.JLabel jl_Totalha_ha;
    private javax.swing.JLabel jl_ano_ha;
    private javax.swing.JLabel jl_aulas_prof;
    private javax.swing.JLabel jl_carga_horaria_prof;
    private javax.swing.JLabel jl_curso2_curso;
    private javax.swing.JLabel jl_curso2_disc;
    private javax.swing.JLabel jl_curso3_curso;
    private javax.swing.JLabel jl_curso_curso;
    private javax.swing.JLabel jl_curso_disc;
    private javax.swing.JLabel jl_curso_serie;
    private javax.swing.JLabel jl_cursoalt_disc;
    private javax.swing.JLabel jl_descricao1_ha;
    private javax.swing.JLabel jl_descricao2_curso;
    private javax.swing.JLabel jl_descricao3_curso;
    private javax.swing.JLabel jl_descricao_curso;
    private javax.swing.JLabel jl_descricao_ha;
    private javax.swing.JLabel jl_descricao_serie;
    private javax.swing.JLabel jl_disciplina_ha;
    private javax.swing.JLabel jl_disciplina_prof;
    private javax.swing.JLabel jl_eixo1_ha;
    private javax.swing.JLabel jl_eixo2_ha;
    private javax.swing.JLabel jl_eixo3_ha;
    private javax.swing.JLabel jl_eixo4_ha;
    private javax.swing.JLabel jl_eixo_disc;
    private javax.swing.JLabel jl_eixo_ha;
    private javax.swing.JLabel jl_eixo_prof;
    private javax.swing.JLabel jl_eixoalt_disc;
    private javax.swing.JTextField jl_hora_aulas_ha;
    private javax.swing.JLabel jl_horaaula_ha;
    private javax.swing.JTextField jl_materia_ha;
    private javax.swing.JLabel jl_nome_disc;
    private javax.swing.JLabel jl_nome_ha;
    private javax.swing.JLabel jl_nome_prof;
    private javax.swing.JLabel jl_nomealt_disc;
    private javax.swing.JLabel jl_pesquisar_disc;
    private javax.swing.JTextField jl_prof_ha;
    private javax.swing.JLabel jl_serie;
    private javax.swing.JLabel jl_serie1;
    private javax.swing.JLabel jl_serie1_ha;
    private javax.swing.JLabel jl_serie2;
    private javax.swing.JLabel jl_serie3;
    private javax.swing.JLabel jl_serie4;
    private javax.swing.JTextField jl_serie_ha;
    private javax.swing.JLabel jl_serie_prof;
    private javax.swing.JLabel jl_serie_serie;
    private javax.swing.JTextField jl_turma_ha;
    private javax.swing.JLabel jl_turma_prof;
    private javax.swing.JLabel jlpesquisa_ha;
    private javax.swing.JLabel marcar;
    private javax.swing.JTextField serie1_prof;
    private javax.swing.JTextField serie2_prof;
    private javax.swing.JTextField serie3_prof;
    private javax.swing.JTextField serieA1;
    private javax.swing.JTextField serieA2;
    private javax.swing.JTextField serieA3;
    private javax.swing.JTextField serieAA;
    private javax.swing.JTextField serieB1;
    private javax.swing.JTextField serieB2;
    private javax.swing.JTextField serieB3;
    private javax.swing.JTextField serieBB;
    private javax.swing.JTextField serieC1;
    private javax.swing.JTextField serieC2;
    private javax.swing.JTextField serieC3;
    private javax.swing.JTextField serieCC;
    private javax.swing.JTextField serieD1;
    private javax.swing.JTextField serieD2;
    private javax.swing.JTextField serieD3;
    private javax.swing.JTextField serieDD;
    private javax.swing.JTextField serieE1;
    private javax.swing.JTextField serieE2;
    private javax.swing.JTextField serieE3;
    private javax.swing.JTextField serieEE;
    private javax.swing.JTextField serieF1;
    private javax.swing.JTextField serieF2;
    private javax.swing.JTextField serieF3;
    private javax.swing.JTextField serieFF;
    private javax.swing.JTextField serieG1;
    private javax.swing.JTextField serieG2;
    private javax.swing.JTextField serieG3;
    private javax.swing.JTextField serieGG;
    private javax.swing.JTextField serieH1;
    private javax.swing.JTextField serieH2;
    private javax.swing.JTextField serieH3;
    private javax.swing.JTextField serieHH;
    private javax.swing.JTextField serieextra;
    private org.netbeans.examples.lib.timerbean.Timer timer1;
    // End of variables declaration//GEN-END:variables
private void DesabilitaAdicionar_curso() {
        jl_curso_curso.setVisible(false);
        jl_descricao_curso.setVisible(false);
        buton_adicionar_curso.setVisible(false);
        jTF_nomecurso_curso.setVisible(false);
        jTF_descricao_curso.setVisible(false);
    }
    
    private void DesabilitaEditar_curso() {
        buton_editar_curso.setVisible(false);
        jCB_curso_curso.setVisible(false);
        jCB_descricao_curso.setVisible(false);
        jTF_cursonovo_curso.setVisible(false);
        jTF_descricaonovo_curso.setVisible(false);
        jl_curso2_curso.setVisible(false);
        jl_descricao2_curso.setVisible(false);
    }

    private void DesabilitaDeletar_curso() {
        buton_deletar_curso.setVisible(false);
        jl_curso3_curso.setVisible(false);
        jl_descricao3_curso.setVisible(false);
        jCB_curso1_curso.setVisible(false);
        jCB_descricao1_curso.setVisible(false);
    }

    private void ChamaEscolha_curso(String escolha) {
        if("Adicionar".equals(escolha)){
        jl_curso_curso.setVisible(true);
        jl_descricao_curso.setVisible(true);
        buton_adicionar_curso.setVisible(true);
        jTF_nomecurso_curso.setVisible(true);
        jTF_descricao_curso.setVisible(true);
        }else if("Editar".equals(escolha)){
        buton_editar_curso.setVisible(true);
        jCB_curso_curso.setVisible(true);
        jCB_descricao_curso.setVisible(true);
        jTF_cursonovo_curso.setVisible(true);
        jTF_descricaonovo_curso.setVisible(true);
        jl_curso2_curso.setVisible(true);
        jl_descricao2_curso.setVisible(true);

        }else if("Deletar".equals(escolha)){
         buton_deletar_curso.setVisible(true); 
         jl_curso3_curso.setVisible(true);
        jl_descricao3_curso.setVisible(true);
        jCB_curso1_curso.setVisible(true);
        jCB_descricao1_curso.setVisible(true);
        }
    }

    private boolean VerificaDadosCorretosADD_curso() {
        if("".equals(jTF_nomecurso_curso.getText()) || "".equals(jTF_descricao_curso.getText()) || !"A".equals(jTF_descricao_curso.getText()) && !"B".equals(jTF_descricao_curso.getText())&& !"C".equals(jTF_descricao_curso.getText())&& !"D".equals(jTF_descricao_curso.getText())&& !"E".equals(jTF_descricao_curso.getText())&& !"F".equals(jTF_descricao_curso.getText())&& !"G".equals(jTF_descricao_curso.getText())&& !"H".equals(jTF_descricao_curso.getText())){
            return false;
        }else {
            return true;
        }
    }

    private void limpaDadosAdicionar_curso() {
        jTF_descricao_curso.setText("");
        jTF_nomecurso_curso.setText("");
    }

    private void InicializaDadosDeletar_curso() {
        
        String[] cursos = cursomet.Buscar_Nome_Cursos();
        jCB_curso1_curso.setModel(new javax.swing.DefaultComboBoxModel(cursos));
        String nome= jCB_curso1_curso.getSelectedItem().toString();
        lista=cursomet.Buscar_Descricaolist(nome);
        String[] descrição = new String[lista.size()];
        for(int i = 0;lista.size()>i;i++){
        curso = lista.get(i);
        descrição[i] = curso.getDescrição(); 
        }
        jCB_descricao1_curso.setModel(new javax.swing.DefaultComboBoxModel(descrição));
    }

    private void AtualizaDadosDeletar_curso() {
        String nome= jCB_curso1_curso.getSelectedItem().toString();
        lista=cursomet.Buscar_Descricaolist(nome);
        String[] descrição = new String[lista.size()];
        for(int i = 0;lista.size()>i;i++){
        curso = lista.get(i);
        descrição[i] = curso.getDescrição(); 
        }
        jCB_descricao1_curso.setModel(new javax.swing.DefaultComboBoxModel(descrição));
        
    }

    private void InicializaDadosEditar_curso() {
         String[] cursos = cursomet.Buscar_Nome_Cursos();
        jCB_curso_curso.setModel(new javax.swing.DefaultComboBoxModel(cursos));
        String nome= jCB_curso_curso.getSelectedItem().toString();
        lista=cursomet.Buscar_Descricaolist(nome);
        String[] descrição = new String[lista.size()];
        for(int i = 0;lista.size()>i;i++){
        curso = lista.get(i);
        descrição[i] = curso.getDescrição(); 
        }
        jCB_descricao_curso.setModel(new javax.swing.DefaultComboBoxModel(descrição));
    }

    private void AtualizaDadosEditar_curso() {
        String nome= jCB_curso_curso.getSelectedItem().toString();
        lista=cursomet.Buscar_Descricaolist(nome);
        String[] descrição = new String[lista.size()];
        for(int i = 0;lista.size()>i;i++){
        curso = lista.get(i);
        descrição[i] = curso.getDescrição(); 
        }
        jCB_descricao_curso.setModel(new javax.swing.DefaultComboBoxModel(descrição));
    }

    private boolean VerificaDadosCorretosEDT_curso() {
        if("".equals(jTF_cursonovo_curso.getText()) || "".equals(jTF_descricaonovo_curso.getText())){
            return false;
        }
        else{
            return true;
        }
    }

    private boolean VerificaBD_curso() {
        if(cursomet.Buscar_Se_Ha_Curso()){
        String[] cursos = cursomet.Buscar_Nome_Cursos();
        if(cursos.length==0){
            return false;
        }else{
            return true;
        }
    }else{
            return false;
        }
    }
    /*
     * 
     * 
     * Metodos Disciplina
     * 
     * 
     * 
     * 
     * 
     */
    
     private void DesabilitaDelEdt_disc() {
        jTTabela_Disc2.clearSelection();
        jTF_pesquisar_disc.setText("");
       while (tmDisc2.getRowCount() > 0) {
            tmDisc2.removeRow(0);
        }
       
  buton_deletar_disc.setVisible(false);  
  buton_editar_disc.setVisible(false);
  jl_pesquisar_disc.setVisible(false);
        jTF_pesquisar_disc.setVisible(false);
        jScrollPane2.setVisible(false);
        jTTabela_Disc2.setVisible(false);
        jl_nomealt_disc.setVisible(false);
        jLabel2_disc.setVisible(false);
        jl_eixoalt_disc.setVisible(false);
        jRB_profissionalalt_disc.setVisible(false);
        jRB_regularalt_disc.setVisible(false);
        jTF_nomediscalt_disc.setVisible(false);
    }
    private void DesabilitaAdicionar_disc() {
        buttonGroup2.clearSelection();
        buton_adicionar_disc.setVisible(false);
        jl_nome_disc.setVisible(false);
        jTF_nomedisc_disc.setVisible(false);
        jl_eixo_disc.setVisible(false);
        jRB_regular_disc.setVisible(false);
        jRB_profissional_disc.setVisible(false);
        jl_curso_disc.setVisible(false);
        
        jCB_curso_disc.setVisible(false);
        
       
    }

    private void DesabilitaVisualizar_disc() {
        jTTable_disc.clearSelection();
         while (tmDisc.getRowCount() > 0) {
            tmDisc.removeRow(0);
        }
        jL_ok_disc.setVisible(false);
        jCB_curso1_disc.setVisible(false);
        
        jl_curso2_disc.setVisible(false);
        
        jScrollPane1.setVisible(false);
        jTTable_disc.setVisible(false);
        jCB_cursoalt_disc.setVisible(false); 
         
         jl_cursoalt_disc.setVisible(false);
         
    }
    private void ChamaEscolha_disc(String escolha) {
        if("Adicionar".equals(escolha)){
        buton_adicionar_disc.setVisible(true);
        jl_nome_disc.setVisible(true);
        jTF_nomedisc_disc.setVisible(true);
        jl_eixo_disc.setVisible(true);
        jRB_regular_disc.setVisible(true);
        jRB_profissional_disc.setVisible(true);
        
        
        }else if("<HTML>Editar<br><br>Deletar".equals(escolha)){
        buton_editar_disc.setVisible(true);
        buton_deletar_disc.setVisible(true);
        jl_pesquisar_disc.setVisible(true);
        jTF_pesquisar_disc.setVisible(true);
        jScrollPane2.setVisible(true);
        jTTabela_Disc2.setVisible(true);
        jl_nomealt_disc.setVisible(true);
        jLabel2_disc.setVisible(true);
        jl_eixoalt_disc.setVisible(true);
        jRB_profissionalalt_disc.setVisible(true);
        jRB_regularalt_disc.setVisible(true);
         jTF_nomediscalt_disc.setVisible(true);

        }else if("Visualizar".equals(escolha)){
         jL_ok_disc.setVisible(true);
        jCB_curso1_disc.setVisible(true);
        
        jl_curso2_disc.setVisible(true);
        
        jScrollPane1.setVisible(true);
        jTTable_disc.setVisible(true);
        
         
        }
    }

    private void InicializaDadosProfissionais_disc() {
        String[] cursos = cursomet.Buscar_Nome_Cursos();
        jCB_curso_disc.setModel(new javax.swing.DefaultComboBoxModel(cursos));
        
    }

   

    private boolean VerificaBD_disc() {
        List<Disciplina> disci = null;
        try {
            disci = discmet.BuscarDisciplinas("%");
        } catch (SQLException ex) {
            Logger.getLogger(Menu3.class.getName()).log(Level.SEVERE, null, ex);
        }
        if(disci.isEmpty()){
            return false;
        }else{
            return true;
        }
    }

    private void DesabilitaProfissional_disc() {
        jl_curso_disc.setVisible(false);
        
        jCB_curso_disc.setVisible(false);
        
    }

    private boolean VerificaDadosCorretosADD_disc() {
        if("".equals(jTF_nomedisc_disc.getText()) || buttonGroup2.getSelection()==null) {
            return false;
        }else {
            return true;
        }
    }

    private void limpaDadosAdicionar_disc() {
        jTF_nomedisc_disc.setText("");
        buttonGroup2.clearSelection();
    }
private void JTTabelaLinhaSelecionada_disc(JTable tabela) {
        
    }

    private void InicializaDadosProfissionais2_disc() {
       String[] cursos = cursomet.Buscar_Nome_Cursos();
        jCB_curso1_disc.setModel(new javax.swing.DefaultComboBoxModel(cursos));
        
    }

    

    private void mostraPesquisa2_disc(List<Disciplina> Disc2) {
        while (tmDisc2.getRowCount() > 0) {
            tmDisc2.removeRow(0);
        }
        if (Disc2.isEmpty()) {
          
        } else {
            String[] linha = new String[]{null, null, null};
            for (int i = 0; i < Disc2.size(); i++) {
                if(Disc2.get(i).getEixo().equals("Regular")){
                tmDisc2.addRow(linha);
                tmDisc2.setValueAt(Disc2.get(i).getEixo(), i, 0);
                tmDisc2.setValueAt(Disc2.get(i).getNome(), i, 2);
                }
                else if(Disc2.get(i).getEixo().equals("Profissional")){
                tmDisc2.addRow(linha);
                tmDisc2.setValueAt(Disc2.get(i).getEixo(), i, 0);
                tmDisc2.setValueAt(Disc2.get(i).getNomecurso(), i, 1);
                tmDisc2.setValueAt(Disc2.get(i).getNome(), i, 2);
                }
                
                
            }
            
            }
    }

    private boolean VerificaDiscipinaBD_disc(String curso) {
        try {
            Disc =  discmet.BuscarDisciplinaCurso(curso);
        } catch (SQLException ex) {
            Logger.getLogger(Menu3.class.getName()).log(Level.SEVERE, null, ex);
        }
        if(Disc.isEmpty()){
            return false;
        }else{
            return true;
        }
    }
    private void JTTabelaLinhaSelecionada2_disc(JTable tabela) {
        if (jTTabela_Disc2.getSelectedRow() > -1) {
            id_disciplina=Disc2.get(tabela.getSelectedRow()).getId_disc();
            jTF_nomediscalt_disc.setText(String.valueOf(Disc2.get(tabela.getSelectedRow()).getNome()));
            if(Disc2.get(tabela.getSelectedRow()).getEixo().equals("Regular")){
                jRB_regularalt_disc.setSelected(true);
               jCB_cursoalt_disc.setVisible(false); 
         
         jl_cursoalt_disc.setVisible(false);
         
            }else{
                jRB_profissionalalt_disc.setSelected(true);
                jCB_cursoalt_disc.setVisible(true); 
         
         jl_cursoalt_disc.setVisible(true);
         
            jCB_cursoalt_disc.setSelectedItem((Disc2.get(tabela.getSelectedRow()).getNomecurso()));
            
            }
            

  }else {
            id_disciplina=0;
            jTF_nomediscalt_disc.setText("");
            buttonGroup3.clearSelection();
               jCB_cursoalt_disc.setVisible(false); 
         
         jl_cursoalt_disc.setVisible(false);
         
        }
 
    }

    private void InicializaDadosEdlDel_disc() {
        try {
            Disc2 = discmet.BuscarDisciplinas(jTF_pesquisar_disc.getText() + "%");
        } catch (SQLException ex) {
            Logger.getLogger(Menu3.class.getName()).log(Level.SEVERE, null, ex);
        }
       
        mostraPesquisa2_disc(Disc2);
        
        String[] cursos = cursomet.Buscar_Nome_Cursos();
        jCB_cursoalt_disc.setModel(new javax.swing.DefaultComboBoxModel(cursos));
        
        
    }

    private void mostraPesquisa_disc(List<Disciplina> Disc) {
        while (tmDisc.getRowCount() > 0) {
            tmDisc.removeRow(0);
        }
        if (Disc.isEmpty()) {
        } else {
            String[] linha = new String[]{null};
            for (int i = 0; i < Disc.size(); i++) {
                tmDisc.addRow(linha);
                tmDisc.setValueAt(Disc.get(i).getNome(), i, 0);
                
                
            }
        }
    }

    

    private boolean VerificaDadosCorretosALTDEL_disc() {
        if("".equals(jTF_nomediscalt_disc.getText()) ){
            return false;
        }else {
            return true;
        }
    }

    private void limpaDadosALTDEL_disc() {
        jTTabela_Disc2.clearSelection();
        jTF_pesquisar_disc.setText("");
        jTF_nomediscalt_disc.setText("");
        buttonGroup3.clearSelection();
        try {
            Disc2 = discmet.BuscarDisciplinas(jTF_pesquisar_disc.getText() + "%");
        } catch (SQLException ex) {
            Logger.getLogger(Menu3.class.getName()).log(Level.SEVERE, null, ex);
        }
       
        mostraPesquisa2_disc(Disc2);
    }

    private boolean Verificasehacursos_disc() {
         String[] cursos = cursomet.Buscar_Nome_Cursos();
        if(cursos.length==0){
            return false;
        }else{
            return true;
        }
    }

    private boolean VerificaBD2_disc() {
        String[] disci = null;
      
            disci = cursomet.Buscar_Nome_Cursos();
       
        if(disci.length==0){
            return false;
        }else{
            return true;
        }
    }
    /*
     * 
     * 
     * Metodos Serie
     * 
     * 
     */
     private void DesabilitaAdicionar_serie() {
        buttonGroup2.clearSelection();
        jl_curso_serie.setVisible(false);
        jl_descricao_serie.setVisible(false);
        jl_serie_serie.setVisible(false);
        jRB_1_serie.setVisible(false);
        jRB_2_serie.setVisible(false);
        jRB_3_serie.setVisible(false);
        jCB_curso_serie.setVisible(false);
        jCB_descricao_serie.setVisible(false);
        buton_adicionar_serie.setVisible(false);
    }

    private void DesabilitaDeletar_serie() {
        buton_deletar_serie.setVisible(false);
        jTTabela_Serie.clearSelection();
         while (tmSerie.getRowCount() > 0) {
            tmSerie.removeRow(0);
        }
         jTTabela_Serie.setVisible(false);
         jScrollPane5.setVisible(false);
    }

    private void ChamaEscolha_serie(String escolha) {
         if("Adicionar".equals(escolha)){
        jl_curso_serie.setVisible(true);
        jl_descricao_serie.setVisible(true);
        jl_serie_serie.setVisible(true);
        buton_adicionar_serie.setVisible(true);
        jRB_1_serie.setVisible(true);
        jRB_2_serie.setVisible(true);
        jRB_3_serie.setVisible(true);
        jCB_curso_serie.setVisible(true);
        jCB_descricao_serie.setVisible(true);
        }else if("<html>Deletar<br><br>Visualizar".equals(escolha)){
         buton_deletar_serie.setVisible(true); 
         jTTabela_Serie.setVisible(true);
         jScrollPane5.setVisible(true);
        }
    }

    private void InicializaDadosADD_serie() {
        if(VerificaseHaCuros_serie()){
        String[] cursos = cursomet.Buscar_Nome_Cursos();
        jCB_curso_serie.setModel(new javax.swing.DefaultComboBoxModel(cursos));
        String nome= jCB_curso_serie.getSelectedItem().toString();
        listaC=cursomet.Buscar_Descricaolist(nome);
        String[] descrição = new String[listaC.size()];
        for(int i = 0;listaC.size()>i;i++){
        curso = listaC.get(i);
        descrição[i] = curso.getDescrição(); 
        }
        jCB_descricao_serie.setModel(new javax.swing.DefaultComboBoxModel(descrição));
        }
    }

    private void AtualizaDadosAdicionar_serie() {
        String nome= jCB_curso_serie.getSelectedItem().toString();
        listaC=cursomet.Buscar_Descricaolist(nome);
        String[] descrição = new String[listaC.size()];
        for(int i = 0;listaC.size()>i;i++){
        curso = listaC.get(i);
        descrição[i] = curso.getDescrição(); 
        }
        jCB_descricao_serie.setModel(new javax.swing.DefaultComboBoxModel(descrição));
    }

    private boolean VerificaDadosCorretos_serie() {
         if( buttonGroup2.getSelection()==null || jCB_curso_serie.getSelectedItem()==null) {
            return false;
        }else {
            return true;
        }
    }
    
    private void JTTabelaLinhaSelecionada_serie(JTable tabela) {
        
  }

    private void mostraPesquisa_serie(List<Serie> listaS) {
         while (tmSerie.getRowCount() > 0) {
            tmSerie.removeRow(0);
        }
        if ( listaS.isEmpty()) {
        } else {
            String[] linha = new String[]{null, null, null };
            for (int i = 0; i <  listaS.size(); i++) {
                tmSerie.addRow(linha);
                tmSerie.setValueAt(listaS.get(i).getNome(), i, 0);
                tmSerie.setValueAt(listaS.get(i).getCurso(), i, 1);
                tmSerie.setValueAt(listaS.get(i).getTurma(), i, 2);
                
            }
        }
    }

    private boolean VerificaseVazio_serie() {
       try {
            listaS= seriemet.Buscar("%");
        } catch (SQLException ex) {
            Logger.getLogger(Menu3.class.getName()).log(Level.SEVERE, null, ex);
        }
       if(listaS.isEmpty()){
          return false; 
       }else{
           return true;
       }
    }

    private boolean VerificaseHaCuros_serie() {
        if(cursomet.Buscar_Se_Ha_Curso()){
        String[] nomes=cursomet.Buscar_Nome_Cursos();
        if(nomes.length==0){
          return false;  
        }else{
            return true;
        }
     }else{
            return false;
        }
    }   
    
    
    /*
     * 
     * 
     * Metodos Horas Aula
     * 
     */
     private void ChamaEscolha_ha(String escolha) {
         if("<html>Adicionar<br><br>Alterar".equals(escolha)){
    jLabel2_ha.setVisible(true); 
     jl_ano_ha.setVisible(true); 
     jCB_ano_ha.setVisible(true); 
     jl_descricao_ha.setVisible(true); 
     jCB_descricao_ha.setVisible(true); 
       
        }else if("Deletar".equals(escolha)){
          JTF_Pesquisar2_ha.setVisible(true);
        jlpesquisa_ha.setVisible(true);
        RB_Materia_ha.setVisible(true);
        RB_Professor_ha.setVisible(true);
        id=0;
        jTTable_hora_aula.setVisible(true);
        jl_serie_ha.setVisible(true);
        jl_turma_ha.setVisible(true);
        jl_prof_ha.setVisible(true);
        jl_materia_ha.setVisible(true);
        jl_hora_aulas_ha.setVisible(true);
        jl_eixo_ha.setVisible(true);
        jl_eixo1_ha.setVisible(true);
        jl_eixo2_ha.setVisible(true);
        jl_eixo3_ha.setVisible(true);
        jl_eixo4_ha.setVisible(true);
        jL_deletar1_ha.setVisible(true);
        jScrollPane4.setVisible(true);
        RB_Professor_ha.setSelected(true);
        }else if("Visualizar".equals(escolha)){
        jl_serie1_ha.setVisible(true);
        jRB_1_ha.setVisible(true);
        jRB_2_ha.setVisible(true);
        jRB_3_ha.setVisible(true);
        jl_descricao1_ha.setVisible(true);
        jCB_descricao1_ha.setVisible(true);
        jLabel4_ha.setVisible(true);
        
        }
    }
 
    private void DesabilitaADDALT_ha() {
     jLabel2_ha.setVisible(false); 
     jl_ano_ha.setVisible(false); 
     jCB_ano_ha.setVisible(false); 
     jl_descricao_ha.setVisible(false); 
     jCB_descricao_ha.setVisible(false); 
     jLabel1_ha.setVisible(false);   
     jl_nome_ha.setVisible(false);
     CB_Professor_ha.setVisible(false);
     jl_disciplina_ha.setVisible(false);
     jCB_disciplina_ha.setVisible(false);
     jLabel3_ha.setVisible(false);
     jl_horaaula_ha.setVisible(false);
     jL_adicionar_ha.setVisible(false);
     jL_editar_ha.setVisible(false);
     jTF_horaaula_ha.setVisible(false);
       
    }

    private void DesabilitaVISDEL_ha() {
        JTF_Pesquisar2_ha.setVisible(false);
        jlpesquisa_ha.setVisible(false);
        RB_Materia_ha.setVisible(false);
        RB_Professor_ha.setVisible(false);
        id=0;
        jTTable_hora_aula.setVisible(false);
        jl_serie_ha.setVisible(false);
        jl_turma_ha.setVisible(false);
        jl_prof_ha.setVisible(false);
        jl_materia_ha.setVisible(false);
        jl_hora_aulas_ha.setVisible(false);
        jl_eixo_ha.setVisible(false);
        jl_eixo1_ha.setVisible(false);
        jl_eixo2_ha.setVisible(false);
        jl_eixo3_ha.setVisible(false);
        jl_eixo4_ha.setVisible(false);
        jL_deletar1_ha.setVisible(false );
        jScrollPane4.setVisible(false);
        limpaDados_ha();
        JTF_Pesquisar2_ha.setText("");
    }

    private void InicializaDadosADDALT_ha() throws SQLException {
        String[] ano=seriemet.BuscarAno();
       
        jCB_ano_ha.setModel(new javax.swing.DefaultComboBoxModel(ano));
        String nome= jCB_ano_ha.getSelectedItem().toString();
        listaS=seriemet.Buscar(nome);
        String[] descrição = new String[listaS.size()];
        for(int i = 0;listaS.size()>i;i++){
        serie = listaS.get(i);
        descrição[i] = serie.getTurma(); 
        }
        jCB_descricao_ha.setModel(new javax.swing.DefaultComboBoxModel(descrição));
    }

  private void JTTabelaLinhaSelecionada_ha(JTable tabela) {
        if (jTTable_hora_aula.getSelectedRow() >= 0) {
            jl_hora_aulas_ha.setText(String.valueOf(HA.get(tabela.getSelectedRow()).getHoras_aula()));
            jl_materia_ha.setText((HA.get(tabela.getSelectedRow()).getMateria()));
            jl_prof_ha.setText((HA.get(tabela.getSelectedRow()).getProfessor()));
            jl_serie_ha.setText((HA.get(tabela.getSelectedRow()).getSerie()));
            jl_turma_ha.setText((HA.get(tabela.getSelectedRow()).getTurma()));  
            id=HA.get(tabela.getSelectedRow()).getId();
        } else {
           limpaDados_ha();
        }
    }

  private void JTTabelaLinhaSelecionada2_ha(JTable tabela) {
        
    }
    private void BuscaDadosTabela_ha() throws SQLException {
         HorasAulaMet dao = new HorasAulaMet();
        HA = dao.BuscarPorProf(JTF_Pesquisar2_ha.getText()+"%");
        mostraPesquisa_ha(HA);
    }

    private void mostraPesquisa_ha(List<HorasAula> HA) {
       while (tmHA.getRowCount() > 0) {
            tmHA.removeRow(0);
        }
        if (HA.isEmpty()) {
        } else {
            String[] linha = new String[]{null, null, null, null, null};
            for (int i = 0; i < HA.size(); i++) {
                tmHA.addRow(linha);
                tmHA.setValueAt(HA.get(i).getSerie(), i, 0);
                tmHA.setValueAt(HA.get(i).getTurma(), i, 1);
                tmHA.setValueAt(HA.get(i).getProfessor(), i, 2);
                tmHA.setValueAt(HA.get(i).getMateria(), i, 3);
                tmHA.setValueAt(HA.get(i).getHoras_aula(), i, 4);
                
            }
        }
    }

    private void limpaDados_ha() {
        jl_hora_aulas_ha.setText("");
        jl_materia_ha.setText("");
        jl_prof_ha.setText("");
        jl_serie_ha.setText("");
        jl_turma_ha.setText("");
      
    }

    private void PesquisarPorMateria_ha() throws SQLException {
        HorasAulaMet dao = new HorasAulaMet();
        HA = dao.BuscarPorMat(JTF_Pesquisar2_ha.getText()+"%");
        mostraPesquisa_ha(HA);
    }

    private boolean Verificasehaseie_ha() {
        try {
            listaS=seriemet.Buscar("%");
        } catch (SQLException ex) {
            Logger.getLogger(Menu3.class.getName()).log(Level.SEVERE, null, ex);
        }
        if(listaS.isEmpty()){
            return false;
        }else{
            return true;
        }
    }

    private boolean VerificaseHA_ha() {
        try {
            HA=hamet.BuscarPorProf("%");
            
        } catch (SQLException ex) {
            Logger.getLogger(Menu3.class.getName()).log(Level.SEVERE, null, ex);
        }
        if(HA.isEmpty()){
            return false;
        }else{
            return true;
        }
    }

    private void DesabilitaVis_ha() {
        jl_serie1_ha.setVisible(false);
        jRB_1_ha.setVisible(false);
        jRB_2_ha.setVisible(false);
        jRB_3_ha.setVisible(false);
        jl_descricao1_ha.setVisible(false);
        jCB_descricao1_ha.setVisible(false);
        jLabel4_ha.setVisible(false);
        jScrollPane3.setVisible(false);
        jTTabela_HA2.setVisible(false);
        jl_Totalha_ha.setVisible(false);
        jTF_totalHA_ha.setVisible(false);
    }

    private void mostraPesquisa2_ha(List<Professor> p) {
        while (tmHA2.getRowCount() > 0) {
            tmHA2.removeRow(0);
        }
        if (p.isEmpty()) {
        } else {
            String[] linha = new String[]{null, null, null, null, null};
            for (int i = 0; i < p.size(); i++) {
                tmHA2.addRow(linha);
                tmHA2.setValueAt(p.get(i).getNome(), i, 0);
                tmHA2.setValueAt(p.get(i).getDisciplinas(), i, 1);
                tmHA2.setValueAt(p.get(i).getAulas(), i, 2);
                
                
            }
        }
    }
    /*
     * 
     * 
     * Metodos Professor
     * 
     * 
     */
          private void DesabilitaADD () {
        timer1.stop();
        buton_adicionar_prof.setVisible(false);
        jl_nome_prof.setVisible(false);
        jl_carga_horaria_prof.setVisible(false);
        jLabel2_prof.setVisible(false);
        jTF_Carga_horaria_prof.setVisible(false);
        jTF_nome_prof.setVisible(false);
        jLabel1.setVisible(false);
        jl_eixo_prof.setVisible(false);
        jl_disciplina_prof.setVisible(false);
        jRB_profissional_prof.setVisible(false);
        jRB_regular_prof.setVisible(false);
        disc1_prof.setVisible(false);
        disc2_prof.setVisible(false);
        disc3_prof.setVisible(false);
        disc4_prof.setVisible(false);
        disc5_prof.setVisible(false);
        jl_aulas_prof.setVisible(false);
        desmarcar.setVisible(false);
        marcar.setVisible(false);
        jScrollPane1_prof.setVisible(false);
        jTable2.setVisible(false);
        jTable1.setVisible(false);
        jScrollPane4_prof.setVisible(false);
        jl_serie_prof.setVisible(false);
        jl_turma_prof.setVisible(false);
        serie1_prof.setVisible(false);
        serie2_prof.setVisible(false);
        serie3_prof.setVisible(false);
        serieA1.setVisible(false);
        serieA2.setVisible(false);
        serieA3.setVisible(false);
        serieA1.setVisible(false);
        serieA2.setVisible(false);
        serieA3.setVisible(false);
        serieB1.setVisible(false);
        serieB2.setVisible(false);
        serieB3.setVisible(false);
        serieC1.setVisible(false);
        serieC2.setVisible(false);
        serieC3.setVisible(false);
        serieD1.setVisible(false);
        serieD2.setVisible(false);
        serieD3.setVisible(false);
        serieE1.setVisible(false);
        serieE2.setVisible(false);
        serieE3.setVisible(false);
        serieF1.setVisible(false);
        serieF2.setVisible(false);
        serieF3.setVisible(false);
        serieG1.setVisible(false);
        serieG2.setVisible(false);
        serieG3.setVisible(false);
        serieH1.setVisible(false);
        serieH2.setVisible(false);
        serieH3.setVisible(false);
        JLA1.setVisible(false);
        JLA2.setVisible(false);
        JLA3.setVisible(false);
        JLB1.setVisible(false);
        JLB2.setVisible(false);
        JLB3.setVisible(false);
        JLC1.setVisible(false);
        JLC2.setVisible(false);
        JLC3.setVisible(false);
        JLD1.setVisible(false);
        JLD2.setVisible(false);
        JLD3.setVisible(false);
        JLE1.setVisible(false);
        JLE2.setVisible(false);
        JLE3.setVisible(false);
        JLF1.setVisible(false);
        JLF2.setVisible(false);
        JLF3.setVisible(false);
        JLG1.setVisible(false);
        JLG2.setVisible(false);
        JLG3.setVisible(false);
        JLH1.setVisible(false);
        JLH2.setVisible(false);
        JLH3.setVisible(false);
        JLDisc1.setVisible(false);
       JLDisc2.setVisible(false);
       JLDisc3.setVisible(false);
       JLDisc4.setVisible(false);
       JLDisc5_prof.setVisible(false);
        
    }
    
    private void DesabilitaALTDEL() {
        buton_deletar_prof.setVisible(false);
        buton_editar_prof.setVisible(false);
        JLR_prof.setVisible(false);
        JLP_prof.setVisible(false);
        JLDisc1.setVisible(false);
        JLDisc2.setVisible(false);
        JLDisc3.setVisible(false);
        JLDisc4.setVisible(false);
        JLDisc5_prof.setVisible(false);
        EixoP_prof.setVisible(false);
        EixoR_prof.setVisible(false);
    }

    private void ChamaEscolha(String escolha) {
        if("Adicionar".equals(escolha)){
       
        buton_adicionar_prof.setVisible(true);
        jl_nome_prof.setVisible(true);
        jl_carga_horaria_prof.setVisible(true);
        jLabel2_prof.setVisible(true);
        jTF_Carga_horaria_prof.setVisible(true);
        jTF_nome_prof.setVisible(true);
        jLabel1.setVisible(true);
        jl_eixo_prof.setVisible(true);
        jl_disciplina_prof.setVisible(true);
        jRB_profissional_prof.setVisible(true);
        jRB_regular_prof.setVisible(true);
        disc1_prof.setVisible(true);
        disc2_prof.setVisible(true);
        disc3_prof.setVisible(true);
        disc4_prof.setVisible(true);
        disc5_prof.setVisible(true);
        jl_aulas_prof.setVisible(true);
        desmarcar.setVisible(true);
        marcar.setVisible(true);
        jScrollPane1_prof.setVisible(true);
        jTable2.setVisible(true);
        jTable1.setVisible(true);
        jScrollPane4_prof.setVisible(true);
        jl_serie_prof.setVisible(true);
        jl_turma_prof.setVisible(true);
        JLDisc1.setVisible(true);
       JLDisc2.setVisible(true);
       JLDisc3.setVisible(true);
       JLDisc4.setVisible(true);
       JLDisc5_prof.setVisible(true);
       marcarMouseClicked(null);
       desmarcarMouseClicked(null);
        timer1.start();
        }else if("<HTML>Editar<br><br>Deletar".equals(escolha)){
        jl_nome_prof.setVisible(true);
        jl_carga_horaria_prof.setVisible(true);
        jLabel2_prof.setVisible(true);
        jTF_Carga_horaria_prof.setVisible(true);
        jTF_nome_prof.setVisible(true);
        jLabel1.setVisible(true);
        jl_eixo_prof.setVisible(true);
        jl_disciplina_prof.setVisible(true);
        EixoR_prof.setVisible(true);
        EixoP_prof.setVisible(true);
        buton_deletar_prof.setVisible(true);
        buton_editar_prof.setVisible(true);
        disc1_prof.setVisible(true);
        disc2_prof.setVisible(true);
        disc3_prof.setVisible(true);
        disc4_prof.setVisible(true);
        disc5_prof.setVisible(true);
        disc1_prof.setText("Clique aqui para adicionar uma disciplina");
        disc2_prof.setText("Clique aqui para adicionar uma disciplina");
        disc3_prof.setText("Clique aqui para adicionar uma disciplina");
        disc4_prof.setText("Clique aqui para adicionar uma disciplina");
        disc5_prof.setText("Clique aqui para adicionar uma disciplina");
        jl_aulas_prof.setVisible(true);
        desmarcar.setVisible(true);
        marcar.setVisible(true);
        jScrollPane1_prof.setVisible(true);
        jTable2.setVisible(true);
        jTable1.setVisible(true);
        jScrollPane4_prof.setVisible(true);
        jl_serie_prof.setVisible(true);
        jl_turma_prof.setVisible(true);
       marcarMouseClicked(null);
       desmarcarMouseClicked(null);
       JLDisc1.setVisible(true);
       JLDisc2.setVisible(true);
       JLDisc3.setVisible(true);
       JLDisc4.setVisible(true);
       JLDisc5_prof.setVisible(true);
       JLR_prof.setVisible(true);
       JLP_prof.setVisible(true);

        }
    }

//    private void disc1() {
//   
//     //       alocação do disc1  
//        
//         if(!"".equals(d1) && "".equals(disc11) && !disc22.equals(d1) && !disc33.equals(d1) && !disc44.equals(d1) && !disc55.equals(d1)){
//           disc1_prof.setText(d1);
//           asd=d1;
//       }else if(!"".equals(d2) && "".equals(disc11) && !disc22.equals(d2) && !disc33.equals(d2) && !disc44.equals(d2) && !disc55.equals(d2)){
//           disc1_prof.setText(d2);
//           asd=d2;
//       }else if(!"".equals(d3) && "".equals(disc11)&& !disc22.equals(d3) && !disc33.equals(d3) && !disc44.equals(d3) && !disc55.equals(d3)){
//           disc1_prof.setText(d3);
//           asd=d3;
//       }else if(!"".equals(d4) && "".equals(disc11)&& !disc22.equals(d4) && !disc33.equals(d4) && !disc44.equals(d4) && !disc55.equals(d4)){
//           disc1_prof.setText(d4);
//           asd=d4;
//       }else if(!"".equals(d5) && "".equals(disc11)&& !disc22.equals(d5) && !disc33.equals(d5) && !disc44.equals(d5) && !disc55.equals(d5)){
//           disc1_prof.setText(d5);
//           asd=d5;
//       }else if(!"".equals(d6) && "".equals(disc11)&& !disc22.equals(d6) && !disc33.equals(d6) && !disc44.equals(d6)){
//           disc1_prof.setText(d6);
//           asd=d6;
//       }else if(!"".equals(d7) && "".equals(disc11)&& !disc22.equals(d7) && !disc33.equals(d7) && !disc44.equals(d7)){
//           disc1_prof.setText(d7);
//           asd=d7;
//       }else if(!"".equals(d8) && "".equals(disc11)&& !disc22.equals(d8) && !disc33.equals(d8) && !disc44.equals(d8)){
//           disc1_prof.setText(d8);
//           asd=d8;
//       }else if(!"".equals(d9) && "".equals(disc11)&& !disc22.equals(d9) && !disc33.equals(d9) && !disc44.equals(d9)){
//           disc1_prof.setText(d9);
//           asd=d9;
//       }else if(!"".equals(d10) && "".equals(disc11)&& !disc22.equals(d10) && !disc33.equals(d10) && !disc44.equals(d10)){
//           disc1_prof.setText(d10);
//           asd=d10;
//       }else if(!"".equals(d11) && "".equals(disc11)&& !disc22.equals(d11) && !disc33.equals(d11) && !disc44.equals(d11)){
//           disc1_prof.setText(d11);
//           asd=d11;
//       }else if(!"".equals(d12) && "".equals(disc11)&& !disc22.equals(d12) && !disc33.equals(d12) && !disc44.equals(d12)){
//           disc1_prof.setText(d12);
//           asd=d12;
//       }else if(!"".equals(d13) && "".equals(disc11)&& !disc22.equals(d13) && !disc33.equals(d13) && !disc44.equals(d13)){
//           disc1_prof.setText(d13);
//           asd=d13;
//       }else if(!"".equals(d14) && "".equals(disc11)&& !disc22.equals(d14) && !disc33.equals(d14) && !disc44.equals(d14)){
//           disc1_prof.setText(d14);
//           asd=d14;
//       }else if(!"".equals(d15) && "".equals(disc11)&& !disc22.equals(d15) && !disc33.equals(d15) && !disc44.equals(d15)){
//           disc1_prof.setText(d15);
//           asd=d15;
//       }else if(!"".equals(d16) && "".equals(disc11)&& !disc22.equals(d16) && !disc33.equals(d16) && !disc44.equals(d16)){
//           disc1_prof.setText(d16);
//           asd=d16;
//       }else if(!"".equals(d17) && "".equals(disc11)&& !disc22.equals(d17) && !disc33.equals(d17) && !disc44.equals(d17)){
//           disc1_prof.setText(d17);
//           asd=d17;
//       }else if(!"".equals(d18) && "".equals(disc11)&& !disc22.equals(d18) && !disc33.equals(d18) && !disc44.equals(d18)){
//           disc1_prof.setText(d18);
//           asd=d18;
//       }else if(!"".equals(d19) && "".equals(disc11)&& !disc22.equals(d19) && !disc33.equals(d19) && !disc44.equals(d19)){
//           disc1_prof.setText(d19);
//           asd=d19;
//       }else if(!"".equals(d20) && "".equals(disc11)&& !disc22.equals(d20) && !disc33.equals(d20) && !disc44.equals(d20)){
//           disc1_prof.setText(d20);
//           asd=d20;
//       }else if(!"".equals(d21) && "".equals(disc11)&& !disc22.equals(d21) && !disc33.equals(d21) && !disc44.equals(d21)){
//           disc1_prof.setText(d21);
//           asd=d21;
//       }else if(!"".equals(d22) && "".equals(disc11)&& !disc22.equals(d22) && !disc33.equals(d22) && !disc44.equals(d22)){
//           disc1_prof.setText(d22);
//           asd=d22;
//       }else if(!"".equals(d23) && "".equals(disc11)&& !disc22.equals(d23) && !disc33.equals(d23) && !disc44.equals(d23)){
//           disc1_prof.setText(d23);
//           asd=d23;
//       }else if(!"".equals(d24) && "".equals(disc11)&& !disc22.equals(d24) && !disc33.equals(d24) && !disc44.equals(d24)){
//           disc1_prof.setText(d24);
//           asd=d24;
//       }else if(!"".equals(d25) && "".equals(disc11)&& !disc22.equals(d25) && !disc33.equals(d25) && !disc44.equals(d25)){
//           disc1_prof.setText(d25);
//           asd=d25;
//       }else if(!"".equals(d26) && "".equals(disc11)&& !disc22.equals(d26) && !disc33.equals(d26) && !disc44.equals(d26)){
//           disc1_prof.setText(d26);
//           asd=d26;
//       }
//         
//         
//         
//      
//       //     Alocaçao de apagar
//else if("".equals(d1) && a==1 && disc11.equals(Porenquanto.getM1ant())){
//           disc1_prof.setText("");
//}else if("".equals(d2) && b==1 && disc11.equals(Porenquanto.getM2ant())){
//           disc1_prof.setText("");    
//}else if("".equals(d3) && c==1 && disc11.equals(Porenquanto.getM3ant())){
//           disc1_prof.setText("");    
//}else if("".equals(d4) && d==1 && disc11.equals(Porenquanto.getM4ant())){
//           disc1_prof.setText("");    
//}else if("".equals(d5) && e==1 && disc11.equals(Porenquanto.getM5ant())){
//           disc1_prof.setText("");    
//}else if("".equals(d6) && f==1 && disc11.equals(Porenquanto.getM6ant())){
//           disc1_prof.setText("");    
//}else if("".equals(d7) && g==1 && disc11.equals(Porenquanto.getM7ant())){
//           disc1_prof.setText("");    
//}else if("".equals(d8) && h==1 && disc11.equals(Porenquanto.getM8ant())){
//           disc1_prof.setText("");    
//}else if("".equals(d9) && i==1 && disc11.equals(Porenquanto.getM9ant())){
//           disc1_prof.setText("");    
//}else if("".equals(d10) && j==1 && disc11.equals(Porenquanto.getM10ant())){
//           disc1_prof.setText("");    
//}else if("".equals(d11) && k==1 && disc11.equals(Porenquanto.getM11ant())){
//           disc1_prof.setText("");    
//}else if("".equals(d12) && l==1 && disc11.equals(Porenquanto.getM12ant())){
//           disc1_prof.setText("");    
//}else if("".equals(d13) && m==1 && disc11.equals(Porenquanto.getM13ant())){
//           disc1_prof.setText("");    
//}else if("".equals(d14) && n==1 && disc11.equals(Porenquanto.getM14ant())){
//           disc1_prof.setText("");    
//}else if("".equals(d15) && o==1 && disc11.equals(Porenquanto.getM15ant())){
//           disc1_prof.setText("");    
//}else if("".equals(d16) && p==1 && disc11.equals(Porenquanto.getM16ant())){
//           disc1_prof.setText("");    
//}else if("".equals(d17) && q==1 && disc11.equals(Porenquanto.getM17ant())){
//           disc1_prof.setText("");    
//}else if("".equals(d18) && r==1 && disc11.equals(Porenquanto.getM18ant())){
//           disc1_prof.setText("");    
//}else if("".equals(d19) && s==1 && disc11.equals(Porenquanto.getM19ant())){
//           disc1_prof.setText("");    
//}else if("".equals(d20) && t==1 && disc11.equals(Porenquanto.getM20ant())){
//           disc1_prof.setText("");    
//}else if("".equals(d21) && u==1 && disc11.equals(Porenquanto.getM21ant())){
//           disc1_prof.setText("");    
//}else if("".equals(d22) && v==1 && disc11.equals(Porenquanto.getM22ant())){
//           disc1_prof.setText("");    
//}else if("".equals(d23) && w==1 && disc11.equals(Porenquanto.getM23ant())){
//           disc1_prof.setText("");    
//}else if("".equals(d24) && x==1 && disc11.equals(Porenquanto.getM24ant())){
//           disc1_prof.setText("");    
//}else if("".equals(d25) && y==1 && disc11.equals(Porenquanto.getM25ant())){
//           disc1_prof.setText("");    
//}else if("".equals(d26) && z==1 && disc11.equals(Porenquanto.getM26ant())){
//           disc1_prof.setText("");    
//}  
//         
//         
// 
//    }
//
//    private void disc2() {
//        
// if("".equals(disc22) && !asd.equals(d1)  && !"".equals(disc11) && !"".equals(d1)&& !disc11.equals(d1) && !disc33.equals(d1) && !disc44.equals(d1) ){
//           disc2_prof.setText(d1);
//           asd2=d1;
//       }else if("".equals(disc22) && !"".equals(disc11) && !asd.equals(d2)  && !"".equals(d2)&& !disc11.equals(d2) && !disc33.equals(d2) && !disc44.equals(d2)){
//           disc2_prof.setText(d2);
//           asd2=d2;
//       }else if("".equals(disc22) && !asd.equals(d3) && !"".equals(disc11)&& !"".equals(d3)&& !disc11.equals(d3) && !disc33.equals(d3) && !disc44.equals(d3)){
//           disc2_prof.setText(d3);  
//           asd2=d3;
//       }else if("".equals(disc22) && !asd.equals(d4) && !"".equals(disc11) && !"".equals(d4)&& !disc11.equals(d4) && !disc33.equals(d4) && !disc44.equals(d4)){
//           disc2_prof.setText(d4);
//           asd2=d4;
//       }else if("".equals(disc22) && !asd.equals(d5) && !"".equals(disc11)&& !"".equals(d5)&& !disc11.equals(d5) && !disc33.equals(d5) && !disc44.equals(d5)){
//           disc2_prof.setText(d5);
//           asd2=d5;
//       }else if("".equals(disc22) && !asd.equals(d6) && !"".equals(disc11)&& !"".equals(d6)&& !disc11.equals(d6) && !disc33.equals(d6) && !disc44.equals(d6)){
//           disc2_prof.setText(d6);
//           asd2=d6;
//       }else if("".equals(disc22) && !asd.equals(d7) && !"".equals(disc11)&& !"".equals(d7)&& !disc11.equals(d7) && !disc33.equals(d7) && !disc44.equals(d7)){
//           disc2_prof.setText(d7);
//           asd2=d7;
//       }else if("".equals(disc22) && !d8.equals(disc11) && !"".equals(disc11)&& !"".equals(d8)&& !disc11.equals(d8) && !disc33.equals(d8) && !disc44.equals(d8)){
//           disc2_prof.setText(d8);
//           asd2=d8;
//       }else if("".equals(disc22) && !d9.equals(disc11) && !"".equals(disc11)&& !"".equals(d9)&& !disc11.equals(d9) && !disc33.equals(d9) && !disc44.equals(d9)){
//           disc2_prof.setText(d9);
//           asd2=d9;
//       }else if("".equals(disc22) && !d10.equals(disc11) && !"".equals(disc11)&& !"".equals(d10)&& !disc11.equals(d10) && !disc33.equals(d10) && !disc44.equals(d10)){
//           disc2_prof.setText(d10);
//           asd2=d10;
//       }else if("".equals(disc22) && !d11.equals(disc11) && !"".equals(disc11)&& !"".equals(d11)&& !disc11.equals(d11) && !disc33.equals(d11) && !disc44.equals(d11)){
//           disc2_prof.setText(d11);
//           asd2=d11;
//       }else if("".equals(disc22) && !d12.equals(disc11) && !"".equals(disc11)&& !"".equals(d12)&& !disc11.equals(d12) && !disc33.equals(d12) && !disc44.equals(d12)){
//           disc2_prof.setText(d12);
//           asd2=d12;
//       }else if("".equals(disc22) && !d13.equals(disc11) && !"".equals(disc11)&& !"".equals(d13)&& !disc11.equals(d13) && !disc33.equals(d13) && !disc44.equals(d13)){
//           disc2_prof.setText(d13);
//           asd2=d13;
//       }else if("".equals(disc22) && !d14.equals(disc11) && !"".equals(disc11)&& !"".equals(d14)&& !disc11.equals(d14) && !disc33.equals(d14) && !disc44.equals(d14)){
//           disc2_prof.setText(d14);
//           asd2=d14;
//       }else if("".equals(disc22) && !d15.equals(disc11) && !"".equals(disc11)&& !"".equals(d15)&& !disc11.equals(d15) && !disc33.equals(d15) && !disc44.equals(d15)){
//           disc2_prof.setText(d15);
//           asd2=d15;
//       }else if("".equals(disc22) && !d16.equals(disc11) && !"".equals(disc11)&& !"".equals(d16)&& !disc11.equals(d16) && !disc33.equals(d16) && !disc44.equals(d16)){
//           disc2_prof.setText(d16);
//           asd2=d16;
//       }else if("".equals(disc22) && !d17.equals(disc11) && !"".equals(disc11)&& !"".equals(d17)&& !disc11.equals(d17) && !disc33.equals(d17) && !disc44.equals(d17)){
//           disc2_prof.setText(d17);
//           asd2=d17;
//       }else if("".equals(disc22) && !d18.equals(disc11) && !"".equals(disc11)&& !"".equals(d18)&& !disc11.equals(d18) && !disc33.equals(d18) && !disc44.equals(d18)){
//           disc2_prof.setText(d18);
//           asd2=d18;
//       }else if("".equals(disc22) && !d19.equals(disc11) && !"".equals(disc11)&& !"".equals(d19)&& !disc11.equals(d19) && !disc33.equals(d19) && !disc44.equals(d19)){
//           disc2_prof.setText(d19);
//           asd2=d19;
//       }else if("".equals(disc22) && !d20.equals(disc11) && !"".equals(disc11)&& !"".equals(d20)&& !disc11.equals(d20) && !disc33.equals(d20) && !disc44.equals(d20)){
//           disc2_prof.setText(d20);
//           asd2=d20;
//       }else if("".equals(disc22) && !d21.equals(disc11) && !"".equals(disc11)&& !"".equals(d21)&& !disc11.equals(d21) && !disc33.equals(d21) && !disc44.equals(d21)){
//           disc2_prof.setText(d21);
//           asd2=d21;
//       }else if("".equals(disc22) && !d22.equals(disc11) && !"".equals(disc11)&& !"".equals(d22)&& !disc11.equals(d22) && !disc33.equals(d22) && !disc44.equals(d22)){
//           disc2_prof.setText(d22);
//           asd2=d22;
//       }else if("".equals(disc22) && !d23.equals(disc11) && !"".equals(disc11)&& !"".equals(d23)&& !disc11.equals(d23) && !disc33.equals(d23) && !disc44.equals(d23)){
//           disc2_prof.setText(d23);
//           asd2=d23;
//       }else if("".equals(disc22) && !d24.equals(disc11) && !"".equals(disc11)&& !"".equals(d24)&& !disc11.equals(d24) && !disc33.equals(d24) && !disc44.equals(d24)){
//           disc2_prof.setText(d24);
//           asd2=d24;
//       }else if("".equals(disc22) && !d25.equals(disc11) && !"".equals(disc11)&& !"".equals(d25)&& !disc11.equals(d25) && !disc33.equals(d25) && !disc44.equals(d25)){
//           disc2_prof.setText(d25);
//           asd2=d25;
//       }else if("".equals(disc22) && !d26.equals(disc11) && !"".equals(disc11)&& !"".equals(d26)&& !disc11.equals(d26) && !disc33.equals(d26) && !disc44.equals(d26)){
//           disc2_prof.setText(d26);
//           asd2=d26;
//       }        
//
//        
//        
//    
//        
// if("".equals(d1) && a==1 && disc22.equals(Porenquanto.getM1ant())){
//           disc2_prof.setText("");
//}else if("".equals(d2) && b==1 && disc22.equals(Porenquanto.getM2ant())){
//           disc2_prof.setText("");    
//}else if("".equals(d3) && c==1 && disc22.equals(Porenquanto.getM3ant())){
//           disc2_prof.setText("");    
//}else if("".equals(d4) && d==1 && disc22.equals(Porenquanto.getM4ant())){
//           disc2_prof.setText("");    
//}else if("".equals(d5) && e==1 && disc22.equals(Porenquanto.getM5ant())){
//           disc2_prof.setText("");    
//}else if("".equals(d6) && f==1 && disc22.equals(Porenquanto.getM6ant())){
//           disc2_prof.setText("");    
//}else if("".equals(d7) && g==1 && disc22.equals(Porenquanto.getM7ant())){
//           disc2_prof.setText("");   
//}else if("".equals(d8) && h==1 && disc22.equals(Porenquanto.getM8ant())){
//           disc2_prof.setText("");    
//}else if("".equals(d9) && i==1 && disc22.equals(Porenquanto.getM9ant())){
//           disc2_prof.setText("");    
//}else if("".equals(d10) && j==1 && disc22.equals(Porenquanto.getM10ant())){
//           disc2_prof.setText("");    
//}else if("".equals(d11) && k==1 && disc22.equals(Porenquanto.getM11ant())){
//           disc2_prof.setText("");    
//}else if("".equals(d12) && l==1 && disc22.equals(Porenquanto.getM12ant())){
//           disc2_prof.setText("");    
//}else if("".equals(d13) && m==1 && disc22.equals(Porenquanto.getM13ant())){
//           disc2_prof.setText("");    
//}else if("".equals(d14) && n==1 && disc22.equals(Porenquanto.getM14ant())){
//           disc2_prof.setText("");    
//}else if("".equals(d15) && o==1 && disc22.equals(Porenquanto.getM15ant())){
//           disc2_prof.setText("");    
//}else if("".equals(d16) && p==1 && disc22.equals(Porenquanto.getM16ant())){
//           disc2_prof.setText("");    
//}else if("".equals(d17) && q==1 && disc22.equals(Porenquanto.getM17ant())){
//           disc2_prof.setText("");    
//}else if("".equals(d17) && r==1 && disc22.equals(Porenquanto.getM18ant())){
//           disc2_prof.setText("");    
//}else if("".equals(d19) && s==1 && disc22.equals(Porenquanto.getM19ant())){
//           disc2_prof.setText("");    
//}else if("".equals(d20) && t==1 && disc22.equals(Porenquanto.getM20ant())){
//           disc2_prof.setText("");    
//}else if("".equals(d21) && u==1 && disc22.equals(Porenquanto.getM21ant())){
//           disc2_prof.setText("");    
//}else if("".equals(d22) && v==1 && disc22.equals(Porenquanto.getM22ant())){
//           disc2_prof.setText("");    
//}else if("".equals(d23) && w==1 && disc22.equals(Porenquanto.getM23ant())){
//           disc2_prof.setText("");    
//}else if("".equals(d24) && x==1 && disc22.equals(Porenquanto.getM24ant())){
//           disc2_prof.setText("");    
//}else if("".equals(d25) && y==1 && disc22.equals(Porenquanto.getM25ant())){
//           disc2_prof.setText("");    
//}else if("".equals(d26) && z==1 && disc22.equals(Porenquanto.getM26ant())){
//           disc2_prof.setText("");    
//}
//    }
//
//    private void disc3() {
//         if("".equals(disc33) && !asd.equals(d1) && !asd2.equals(d1) &&  !"".equals(disc11) && !"".equals(disc22) && !"".equals(d1)&& !disc11.equals(d1) && !disc22.equals(d1) && !disc44.equals(d1)){
//           disc3_prof.setText(d1);
//           asd3=d1;
//       }else if("".equals(disc33)  &&  !"".equals(disc11) && !"".equals(disc22)&& !"".equals(d2) && !asd.equals(d2) && !asd2.equals(d2)&& !disc11.equals(d2) && !disc22.equals(d2) && !disc44.equals(d2) ){
//           disc3_prof.setText(d2);
//           asd3=d2;
//       }else if("".equals(disc33) &&  !"".equals(disc11) && !"".equals(disc22)&& !"".equals(d3) && !asd.equals(d3) && !asd2.equals(d3)&& !disc11.equals(d3) && !disc22.equals(d3) && !disc44.equals(d3)){
//           disc3_prof.setText(d3);
//           asd3=d3;
//       }else if("".equals(disc33) &&  !"".equals(disc11) && !"".equals(disc22)&& !"".equals(d4) && !asd.equals(d4) && !asd2.equals(d4)&& !disc11.equals(d4) && !disc22.equals(d4) && !disc44.equals(d4)){
//           disc3_prof.setText(d4);
//           asd3=d4;
//       }else if("".equals(disc33) &&  !"".equals(disc11) && !"".equals(disc22)&& !"".equals(d5) && !asd.equals(d5) && !asd2.equals(d5)&& !disc11.equals(d5) && !disc22.equals(d5) && !disc44.equals(d5)){
//           disc3_prof.setText(d5);
//           asd3=d5;
//       }else if("".equals(disc33) &&  !"".equals(disc11) && !"".equals(disc22)&& !"".equals(d6) && !asd.equals(d6) && !asd2.equals(d6)&& !disc11.equals(d6) && !disc22.equals(d6) && !disc44.equals(d6)){
//           disc3_prof.setText(d6);
//           asd3=d6;
//       }else if("".equals(disc33) &&  !"".equals(disc11) && !"".equals(disc22)&& !"".equals(d7) && !asd.equals(d7) && !asd2.equals(d7)&& !disc11.equals(d7) && !disc22.equals(d7) && !disc44.equals(d7)){
//           disc3_prof.setText(d7);
//           asd3=d7;
//       }else if("".equals(disc33) &&  !"".equals(disc11) && !"".equals(disc22)&& !"".equals(d8) && !asd.equals(d8) && !asd2.equals(d8)&& !disc11.equals(d8) && !disc22.equals(d8) && !disc44.equals(d8)){
//           disc3_prof.setText(d8);
//           asd3=d8;
//       }else if("".equals(disc33) &&  !"".equals(disc11) && !"".equals(disc22)&& !"".equals(d9) && !asd.equals(d9) && !asd2.equals(d9)&& !disc11.equals(d9) && !disc22.equals(d9) && !disc44.equals(d9)){
//           disc3_prof.setText(d9);
//           asd3=d9;
//       }else if("".equals(disc33) &&  !"".equals(disc11) && !"".equals(disc22)&& !"".equals(d10) && !asd.equals(d10) && !asd2.equals(d10)&& !disc11.equals(d10) && !disc22.equals(d10) && !disc44.equals(d10)){
//           disc3_prof.setText(d10);
//           asd3=d10;
//       }else if("".equals(disc33) &&  !"".equals(disc11) && !"".equals(disc22)&& !"".equals(d11) && !asd.equals(d11) && !asd2.equals(d11)&& !disc11.equals(d11) && !disc22.equals(d11) && !disc44.equals(d11)){
//           disc3_prof.setText(d11);
//           asd3=d11;
//       }else if("".equals(disc33) &&  !"".equals(disc11) && !"".equals(disc22)&& !"".equals(d12) && !asd.equals(d12) && !asd2.equals(d12)&& !disc11.equals(d12) && !disc22.equals(d12) && !disc44.equals(d12)){
//           disc3_prof.setText(d12);
//           asd3=d12;
//       }else if("".equals(disc33) &&  !"".equals(disc11) && !"".equals(disc22)&& !"".equals(d13) && !asd.equals(d13) && !asd2.equals(d13)&& !disc11.equals(d13) && !disc22.equals(d13) && !disc44.equals(d13)){
//           disc3_prof.setText(d13);
//           asd3=d13;
//       }else if("".equals(disc33) &&  !"".equals(disc11) && !"".equals(disc22)&& !"".equals(d14) && !asd.equals(d14) && !asd2.equals(d14)&& !disc11.equals(d14) && !disc22.equals(d14) && !disc44.equals(d14)){
//           disc3_prof.setText(d14);
//           asd3=d14;
//       }else if("".equals(disc33) &&  !"".equals(disc11) && !"".equals(disc22)&& !"".equals(d15) && !asd.equals(d15) && !asd2.equals(d15)&& !disc11.equals(d15) && !disc22.equals(d15) && !disc44.equals(d15)){
//           disc3_prof.setText(d15);
//           asd3=d15;
//       }else if("".equals(disc33) &&  !"".equals(disc11) && !"".equals(disc22)&& !"".equals(d16) && !asd.equals(d16) && !asd2.equals(d16)&& !disc11.equals(d16) && !disc22.equals(d16) && !disc44.equals(d16)){
//           disc3_prof.setText(d16);
//           asd3=d16;
//       }else if("".equals(disc33) &&  !"".equals(disc11) && !"".equals(disc22)&& !"".equals(d17) && !asd.equals(d17) && !asd2.equals(d17)&& !disc11.equals(d17) && !disc22.equals(d17) && !disc44.equals(d17)){
//           disc3_prof.setText(d17);
//           asd3=d17;
//       }else if("".equals(disc33) &&  !"".equals(disc11) && !"".equals(disc22)&& !"".equals(d18) && !asd.equals(d18) && !asd2.equals(d18)&& !disc11.equals(d18) && !disc22.equals(d18) && !disc44.equals(d18)){
//           disc3_prof.setText(d18);
//           asd3=d18;
//       }else if("".equals(disc33) &&  !"".equals(disc11) && !"".equals(disc22)&& !"".equals(d19) && !asd.equals(d19) && !asd2.equals(d19)&& !disc11.equals(d19) && !disc22.equals(d19) && !disc44.equals(d19)){
//           disc3_prof.setText(d19);
//           asd3=d19;
//       }else if("".equals(disc33) &&  !"".equals(disc11) && !"".equals(disc22)&& !"".equals(d20) && !asd.equals(d20) && !asd2.equals(d20)&& !disc11.equals(d20) && !disc22.equals(d20) && !disc44.equals(d20)){
//           disc3_prof.setText(d20);
//           asd3=d20;
//       }else if("".equals(disc33) &&  !"".equals(disc11) && !"".equals(disc22)&& !"".equals(d21) && !asd.equals(d21) && !asd2.equals(d21)&& !disc11.equals(d21) && !disc22.equals(d21) && !disc44.equals(d21)){
//           disc3_prof.setText(d21);
//           asd3=d21;
//       }else if("".equals(disc33) &&  !"".equals(disc11) && !"".equals(disc22)&& !"".equals(d22) && !asd.equals(d22) && !asd2.equals(d22)&& !disc11.equals(d22) && !disc22.equals(d22) && !disc44.equals(d22)){
//           disc3_prof.setText(d22);
//           asd3=d22;
//       }else if("".equals(disc33) &&  !"".equals(disc11) && !"".equals(disc22)&& !"".equals(d23) && !asd.equals(d23) && !asd2.equals(d23)&& !disc11.equals(d23) && !disc22.equals(d23) && !disc44.equals(d23)){
//           disc3_prof.setText(d23);
//           asd3=d23;
//       }else if("".equals(disc33) &&  !"".equals(disc11) && !"".equals(disc22)&& !"".equals(d24) && !asd.equals(d24) && !asd2.equals(d24)&& !disc11.equals(d24) && !disc22.equals(d24) && !disc44.equals(d24)){
//           disc3_prof.setText(d24);
//           asd3=d24;
//       }else if("".equals(disc33) &&  !"".equals(disc11) && !"".equals(disc22)&& !"".equals(d25) && !asd.equals(d25) && !asd2.equals(d25)&& !disc11.equals(d25) && !disc22.equals(d25) && !disc44.equals(d25)){
//           disc3_prof.setText(d25);
//           asd3=d25;
//       }else if("".equals(disc33) &&  !"".equals(disc11) && !"".equals(disc22)&& !"".equals(d26) && !asd.equals(d26) && !asd2.equals(d26)&& !disc11.equals(d26) && !disc22.equals(d26) && !disc44.equals(d26)){
//           disc3_prof.setText(d26);
//           asd3=d26;
//       }
//         
//         
//       else if("".equals(d1) && a==1 && disc33.equals(Porenquanto.getM1ant())){
//           disc3_prof.setText("");
//}else if("".equals(d2) && b==1 && disc33.equals(Porenquanto.getM2ant())){
//           disc3_prof.setText("");    
//}else if("".equals(d3) && c==1 && disc33.equals(Porenquanto.getM3ant())){
//           disc3_prof.setText("");    
//}else if("".equals(d4) && d==1 && disc33.equals(Porenquanto.getM4ant())){
//           disc3_prof.setText("");    
//}else if("".equals(d5) && e==1 && disc33.equals(Porenquanto.getM5ant())){
//           disc3_prof.setText("");    
//}else if("".equals(d6) && f==1 && disc33.equals(Porenquanto.getM6ant())){
//           disc3_prof.setText("");    
//}else if("".equals(d7) && g==1 && disc33.equals(Porenquanto.getM7ant())){
//           disc3_prof.setText("");   
//}else if("".equals(d8) && h==1 && disc33.equals(Porenquanto.getM8ant())){
//           disc3_prof.setText("");    
//}else if("".equals(d9) && i==1 && disc33.equals(Porenquanto.getM9ant())){
//           disc3_prof.setText("");    
//}else if("".equals(d10) && j==1 && disc33.equals(Porenquanto.getM10ant())){
//           disc3_prof.setText("");    
//}else if("".equals(d11) && k==1 && disc33.equals(Porenquanto.getM11ant())){
//           disc3_prof.setText("");    
//}else if("".equals(d12) && l==1 && disc33.equals(Porenquanto.getM12ant())){
//           disc3_prof.setText("");    
//}else if("".equals(d13) && m==1 && disc33.equals(Porenquanto.getM13ant())){
//           disc3_prof.setText("");    
//}else if("".equals(d14) && n==1 && disc33.equals(Porenquanto.getM14ant())){
//           disc3_prof.setText("");    
//}else if("".equals(d15) && o==1 && disc33.equals(Porenquanto.getM15ant())){
//           disc3_prof.setText("");    
//}else if("".equals(d16) && p==1 && disc33.equals(Porenquanto.getM16ant())){
//           disc3_prof.setText("");    
//}else if("".equals(d17) && q==1 && disc33.equals(Porenquanto.getM17ant())){
//           disc3_prof.setText("");    
//}else if("".equals(d17) && r==1 && disc33.equals(Porenquanto.getM18ant())){
//           disc3_prof.setText("");    
//}else if("".equals(d19) && s==1 && disc33.equals(Porenquanto.getM19ant())){
//           disc3_prof.setText("");    
//}else if("".equals(d20) && t==1 && disc33.equals(Porenquanto.getM20ant())){
//           disc3_prof.setText("");    
//}else if("".equals(d21) && u==1 && disc33.equals(Porenquanto.getM21ant())){
//           disc3_prof.setText("");    
//}else if("".equals(d22) && v==1 && disc33.equals(Porenquanto.getM22ant())){
//           disc3_prof.setText("");    
//}else if("".equals(d23) && w==1 && disc33.equals(Porenquanto.getM23ant())){
//           disc3_prof.setText("");    
//}else if("".equals(d24) && x==1 && disc33.equals(Porenquanto.getM24ant())){
//           disc3_prof.setText("");    
//}else if("".equals(d25) && y==1 && disc33.equals(Porenquanto.getM25ant())){
//           disc3_prof.setText("");    
//}else if("".equals(d26) && z==1 && disc33.equals(Porenquanto.getM26ant())){
//           disc3_prof.setText("");    
//}
//         
//    }
//
//    private void disc4() {
//        if("".equals(disc44) && !asd.equals(d1) && !asd2.equals(d1) && !asd3.equals(d1) && !"".equals(disc11) && !"".equals(disc22) && !"".equals(d1) && !disc11.equals(d1) && !disc22.equals(d1) && !disc33.equals(d1)){
//       disc4_prof.setText(d1);
//       }else if("".equals(disc44) &&  !"".equals(disc11) && !"".equals(disc22) && !"".equals(disc33) && !"".equals(d2) && !asd.equals(d2) && !asd2.equals(d2) && !asd3.equals(d2)&& !disc11.equals(d2) && !disc22.equals(d2) && !disc33.equals(d2)){
//       disc4_prof.setText(d2);
//       }else if("".equals(disc44) &&  !"".equals(disc11) && !"".equals(disc22) && !"".equals(disc33) && !"".equals(d3) && !asd.equals(d3) && !asd2.equals(d3) && !asd3.equals(d3)&& !disc11.equals(d3) && !disc22.equals(d3) && !disc33.equals(d3)){
//       disc4_prof.setText(d3);
//       }else if("".equals(disc44) &&  !"".equals(disc11) && !"".equals(disc22) && !"".equals(disc33) && !"".equals(d4) && !asd.equals(d4) && !asd2.equals(d4) && !asd3.equals(d4)&& !disc11.equals(d4) && !disc22.equals(d4) && !disc33.equals(d4)){
//       disc4_prof.setText(d4);
//       }else if("".equals(disc44) &&  !"".equals(disc11) && !"".equals(disc22) && !"".equals(disc33) && !"".equals(d5) && !asd.equals(d5) && !asd2.equals(d5) && !asd3.equals(d5)&& !disc11.equals(d5) && !disc22.equals(d5) && !disc33.equals(d5)){
//       disc4_prof.setText(d5);
//       }else if("".equals(disc44) &&  !"".equals(disc11) && !"".equals(disc22) && !"".equals(disc33) && !"".equals(d6) && !asd.equals(d6) && !asd2.equals(d6) && !asd3.equals(d6)&& !disc11.equals(d6) && !disc22.equals(d6) && !disc33.equals(d6)){
//       disc4_prof.setText(d6);
//        System.out.println(d6);
//       }else if("".equals(disc44) &&  !"".equals(disc11) && !"".equals(disc22) && !"".equals(disc33) && !"".equals(d7) && !asd.equals(d7) && !asd2.equals(d7) && !asd3.equals(d7)&& !disc11.equals(d7) && !disc22.equals(d7) && !disc33.equals(d7)){
//       disc4_prof.setText(d7);
//       }else if("".equals(disc44) &&  !"".equals(disc11) && !"".equals(disc22) && !"".equals(disc33) && !"".equals(d8) && !asd.equals(d8) && !asd2.equals(d8) && !asd3.equals(d8)&& !disc11.equals(d8) && !disc22.equals(d8) && !disc33.equals(d8)){
//       disc4_prof.setText(d8);
//       }else if("".equals(disc44) &&  !"".equals(disc11) && !"".equals(disc22) && !"".equals(disc33) && !"".equals(d9) && !asd.equals(d9) && !asd2.equals(d9) && !asd3.equals(d9)&& !disc11.equals(d9) && !disc22.equals(d9) && !disc33.equals(d9)){
//       disc4_prof.setText(d9);
//       }else if("".equals(disc44) &&  !"".equals(disc11) && !"".equals(disc22) && !"".equals(disc33) && !"".equals(d10) && !asd.equals(d10) && !asd2.equals(d10) && !asd3.equals(d10)&& !disc11.equals(d10) && !disc22.equals(d10) && !disc33.equals(d10)){
//       disc4_prof.setText(d10);
//       }else if("".equals(disc44) &&  !"".equals(disc11) && !"".equals(disc22) && !"".equals(disc33) && !"".equals(d11) && !asd.equals(d11) && !asd2.equals(d11) && !asd3.equals(d11)&& !disc11.equals(d11) && !disc22.equals(d11) && !disc33.equals(d11)){
//       disc4_prof.setText(d11);
//       }else if("".equals(disc44) &&  !"".equals(disc11) && !"".equals(disc22) && !"".equals(disc33) && !"".equals(d12) && !asd.equals(d12) && !asd2.equals(d12) && !asd3.equals(d12)&& !disc11.equals(d12) && !disc22.equals(d12) && !disc33.equals(d12)){
//       disc4_prof.setText(d12);
//       }else if("".equals(disc44) &&  !"".equals(disc11) && !"".equals(disc22) && !"".equals(disc33) && !"".equals(d13) && !asd.equals(d13) && !asd2.equals(d13) && !asd3.equals(d13)&& !disc11.equals(d13) && !disc22.equals(d13) && !disc33.equals(d13)){
//       disc4_prof.setText(d13);
//       }else if("".equals(disc44) &&  !"".equals(disc11) && !"".equals(disc22) && !"".equals(disc33) && !"".equals(d14) && !asd.equals(d14) && !asd2.equals(d14) && !asd3.equals(d14)&& !disc11.equals(d14) && !disc22.equals(d14) && !disc33.equals(d14)){
//       disc4_prof.setText(d14);
//       }else if("".equals(disc44) &&  !"".equals(disc11) && !"".equals(disc22) && !"".equals(disc33) && !"".equals(d15) && !asd.equals(d15) && !asd2.equals(d15) && !asd3.equals(d15)&& !disc11.equals(d15) && !disc22.equals(d15) && !disc33.equals(d15)){
//       disc4_prof.setText(d15);
//       }else if("".equals(disc44) &&  !"".equals(disc11) && !"".equals(disc22) && !"".equals(disc33) && !"".equals(d16) && !asd.equals(d16) && !asd2.equals(d16) && !asd3.equals(d16)&& !disc11.equals(d16) && !disc22.equals(d16) && !disc33.equals(d16)){
//       disc4_prof.setText(d16);
//       }else if("".equals(disc44) &&  !"".equals(disc11) && !"".equals(disc22) && !"".equals(disc33) && !"".equals(d17) && !asd.equals(d17) && !asd2.equals(d17) && !asd3.equals(d17)&& !disc11.equals(d17) && !disc22.equals(d17) && !disc33.equals(d17)){
//       disc4_prof.setText(d17);
//       }else if("".equals(disc44) &&  !"".equals(disc11) && !"".equals(disc22) && !"".equals(disc33) && !"".equals(d18) && !asd.equals(d18) && !asd2.equals(d18) && !asd3.equals(d18)&& !disc11.equals(d18) && !disc22.equals(d18) && !disc33.equals(d18)){
//       disc4_prof.setText(d18);
//       }else if("".equals(disc44) &&  !"".equals(disc11) && !"".equals(disc22) && !"".equals(disc33) && !"".equals(d19) && !asd.equals(d19) && !asd2.equals(d19) && !asd3.equals(d19)&& !disc11.equals(d19) && !disc22.equals(d19) && !disc33.equals(d19)){
//       disc4_prof.setText(d19);
//       }else if("".equals(disc44) &&  !"".equals(disc11) && !"".equals(disc22) && !"".equals(disc33) && !"".equals(d20) && !asd.equals(d20) && !asd2.equals(d20) && !asd3.equals(d20)&& !disc11.equals(d20) && !disc22.equals(d20) && !disc33.equals(d20)){
//       disc4_prof.setText(d20);
//       }else if("".equals(disc44) &&  !"".equals(disc11) && !"".equals(disc22) && !"".equals(disc33) && !"".equals(d21) && !asd.equals(d21) && !asd2.equals(d21) && !asd3.equals(d21)&& !disc11.equals(d21) && !disc22.equals(d21) && !disc33.equals(d21)){
//       disc4_prof.setText(d21);
//       }else if("".equals(disc44) &&  !"".equals(disc11) && !"".equals(disc22) && !"".equals(disc33) && !"".equals(d22) && !asd.equals(d22) && !asd2.equals(d22) && !asd3.equals(d22)&& !disc11.equals(d22) && !disc22.equals(d22) && !disc33.equals(d22)){
//       disc4_prof.setText(d22);
//       }else if("".equals(disc44) &&  !"".equals(disc11) && !"".equals(disc22) && !"".equals(disc33) && !"".equals(d23) && !asd.equals(d23) && !asd2.equals(d23) && !asd3.equals(d23)&& !disc11.equals(d23) && !disc22.equals(d23) && !disc33.equals(d23)){
//       disc4_prof.setText(d23);
//       }else if("".equals(disc44) &&  !"".equals(disc11) && !"".equals(disc22) && !"".equals(disc33) && !"".equals(d24) && !asd.equals(d24) && !asd2.equals(d24) && !asd3.equals(d24)&& !disc11.equals(d24) && !disc22.equals(d24) && !disc33.equals(d24)){
//       disc4_prof.setText(d24);
//       }else if("".equals(disc44) &&  !"".equals(disc11) && !"".equals(disc22) && !"".equals(disc33) && !"".equals(d25) && !asd.equals(d25) && !asd2.equals(d25) && !asd3.equals(d25)&& !disc11.equals(d25) && !disc22.equals(d25) && !disc33.equals(d25)){
//       disc4_prof.setText(d25);
//       }else if("".equals(disc44) &&  !"".equals(disc11) && !"".equals(disc22) && !"".equals(disc33) && !"".equals(d26) && !asd.equals(d26) && !asd2.equals(d26) && !asd3.equals(d26)&& !disc11.equals(d26) && !disc22.equals(d26) && !disc33.equals(d26)){
//       disc4_prof.setText(d26);
//       }
//        
//        
//         else if("".equals(d1) && a==1 && disc44.equals(Porenquanto.getM1ant())){
//           disc4_prof.setText("");
//}else if("".equals(d2) && b==1 && disc44.equals(Porenquanto.getM2ant())){
//           disc4_prof.setText("");    
//}else if("".equals(d3) && c==1 && disc44.equals(Porenquanto.getM3ant())){
//           disc4_prof.setText("");    
//}else if("".equals(d4) && d==1 && disc44.equals(Porenquanto.getM4ant())){
//           disc4_prof.setText("");    
//}else if("".equals(d5) && e==1 && disc44.equals(Porenquanto.getM5ant())){
//           disc4_prof.setText("");    
//}else if("".equals(d6) && f==1 && disc44.equals(Porenquanto.getM6ant())){
//           disc4_prof.setText("");    
//}else if("".equals(d7) && g==1 && disc44.equals(Porenquanto.getM7ant())){
//           disc4_prof.setText("");   
//}else if("".equals(d8) && h==1 && disc44.equals(Porenquanto.getM8ant())){
//           disc4_prof.setText("");    
//}else if("".equals(d9) && i==1 && disc44.equals(Porenquanto.getM9ant())){
//           disc4_prof.setText("");    
//}else if("".equals(d10) && j==1 && disc44.equals(Porenquanto.getM10ant())){
//           disc4_prof.setText("");    
//}else if("".equals(d11) && k==1 && disc44.equals(Porenquanto.getM11ant())){
//           disc4_prof.setText("");    
//}else if("".equals(d12) && l==1 && disc44.equals(Porenquanto.getM12ant())){
//           disc4_prof.setText("");    
//}else if("".equals(d13) && m==1 && disc44.equals(Porenquanto.getM13ant())){
//           disc4_prof.setText("");    
//}else if("".equals(d14) && n==1 && disc44.equals(Porenquanto.getM14ant())){
//           disc4_prof.setText("");    
//}else if("".equals(d15) && o==1 && disc44.equals(Porenquanto.getM15ant())){
//           disc4_prof.setText("");    
//}else if("".equals(d16) && p==1 && disc44.equals(Porenquanto.getM16ant())){
//           disc4_prof.setText("");    
//}else if("".equals(d17) && q==1 && disc44.equals(Porenquanto.getM17ant())){
//           disc4_prof.setText("");    
//}else if("".equals(d17) && r==1 && disc44.equals(Porenquanto.getM18ant())){
//           disc4_prof.setText("");    
//}else if("".equals(d19) && s==1 && disc44.equals(Porenquanto.getM19ant())){
//           disc4_prof.setText("");    
//}else if("".equals(d20) && t==1 && disc44.equals(Porenquanto.getM20ant())){
//           disc4_prof.setText("");    
//}else if("".equals(d21) && u==1 && disc44.equals(Porenquanto.getM21ant())){
//           disc4_prof.setText("");    
//}else if("".equals(d22) && v==1 && disc44.equals(Porenquanto.getM22ant())){
//           disc4_prof.setText("");    
//}else if("".equals(d23) && w==1 && disc44.equals(Porenquanto.getM23ant())){
//           disc4_prof.setText("");    
//}else if("".equals(d24) && x==1 && disc44.equals(Porenquanto.getM24ant())){
//           disc4_prof.setText("");   
//}else if("".equals(d25) && y==1 && disc44.equals(Porenquanto.getM25ant())){
//           disc4_prof.setText("");    
//}else if("".equals(d26) && z==1 && disc44.equals(Porenquanto.getM26ant())){
//           disc4_prof.setText("");    
//}
//    }
private void disc1() {
   
     //       alocação do disc1  
        
         if(!"".equals(d1) && "".equals(disc11) && !disc22.equals(d1) && !disc33.equals(d1) && !disc44.equals(d1) && !disc55.equals(d1)){
           disc1_prof.setText(d1);
           asd=d1;
       }else if(!"".equals(d2) && "".equals(disc11) && !disc22.equals(d2) && !disc33.equals(d2) && !disc44.equals(d2) && !disc55.equals(d2)){
           disc1_prof.setText(d2);
           asd=d2;
       }else if(!"".equals(d3) && "".equals(disc11)&& !disc22.equals(d3) && !disc33.equals(d3) && !disc44.equals(d3) && !disc55.equals(d3)){
           disc1_prof.setText(d3);
           asd=d3;
       }else if(!"".equals(d4) && "".equals(disc11)&& !disc22.equals(d4) && !disc33.equals(d4) && !disc44.equals(d4) && !disc55.equals(d4)){
           disc1_prof.setText(d4);
           asd=d4;
       }else if(!"".equals(d5) && "".equals(disc11)&& !disc22.equals(d5) && !disc33.equals(d5) && !disc44.equals(d5) && !disc55.equals(d5)){
           disc1_prof.setText(d5);
           asd=d5;
       }else if(!"".equals(d6) && "".equals(disc11)&& !disc22.equals(d6) && !disc33.equals(d6) && !disc44.equals(d6) && !disc55.equals(d6)){
           disc1_prof.setText(d6);
           asd=d6;
       }else if(!"".equals(d7) && "".equals(disc11)&& !disc22.equals(d7) && !disc33.equals(d7) && !disc44.equals(d7) && !disc55.equals(d7)){
           disc1_prof.setText(d7);
           asd=d7;
       }else if(!"".equals(d8) && "".equals(disc11)&& !disc22.equals(d8) && !disc33.equals(d8) && !disc44.equals(d8) && !disc55.equals(d8)){
           disc1_prof.setText(d8);
           asd=d8;
       }else if(!"".equals(d9) && "".equals(disc11)&& !disc22.equals(d9) && !disc33.equals(d9) && !disc44.equals(d9) && !disc55.equals(d9)){
           disc1_prof.setText(d9);
           asd=d9;
       }else if(!"".equals(d10) && "".equals(disc11)&& !disc22.equals(d10) && !disc33.equals(d10) && !disc44.equals(d10) && !disc55.equals(d10)){
           disc1_prof.setText(d10);
           asd=d10;
       }else if(!"".equals(d11) && "".equals(disc11)&& !disc22.equals(d11) && !disc33.equals(d11) && !disc44.equals(d11) && !disc55.equals(d11)){
           disc1_prof.setText(d11);
           asd=d11;
       }else if(!"".equals(d12) && "".equals(disc11)&& !disc22.equals(d12) && !disc33.equals(d12) && !disc44.equals(d12) && !disc55.equals(d12)){
           disc1_prof.setText(d12);
           asd=d12;
       }else if(!"".equals(d13) && "".equals(disc11)&& !disc22.equals(d13) && !disc33.equals(d13) && !disc44.equals(d13) && !disc55.equals(d13)){
           disc1_prof.setText(d13);
           asd=d13;
       }else if(!"".equals(d14) && "".equals(disc11)&& !disc22.equals(d14) && !disc33.equals(d14) && !disc44.equals(d14) && !disc55.equals(d14)){
           disc1_prof.setText(d14);
           asd=d14;
       }else if(!"".equals(d15) && "".equals(disc11)&& !disc22.equals(d15) && !disc33.equals(d15) && !disc44.equals(d15) && !disc55.equals(d15)){
           disc1_prof.setText(d15);
           asd=d15;
       }else if(!"".equals(d16) && "".equals(disc11)&& !disc22.equals(d16) && !disc33.equals(d16) && !disc44.equals(d16) && !disc55.equals(d16)){
           disc1_prof.setText(d16);
           asd=d16;
       }else if(!"".equals(d17) && "".equals(disc11)&& !disc22.equals(d17) && !disc33.equals(d17) && !disc44.equals(d17) && !disc55.equals(d17)){
           disc1_prof.setText(d17);
           asd=d17;
       }else if(!"".equals(d18) && "".equals(disc11)&& !disc22.equals(d18) && !disc33.equals(d18) && !disc44.equals(d18) && !disc55.equals(d18)){
           disc1_prof.setText(d18);
           asd=d18;
       }else if(!"".equals(d19) && "".equals(disc11)&& !disc22.equals(d19) && !disc33.equals(d19) && !disc44.equals(d19) && !disc55.equals(d19)){
           disc1_prof.setText(d19);
           asd=d19;
       }else if(!"".equals(d20) && "".equals(disc11)&& !disc22.equals(d20) && !disc33.equals(d20) && !disc44.equals(d20) && !disc55.equals(d20)){
           disc1_prof.setText(d20);
           asd=d20;
       }else if(!"".equals(d21) && "".equals(disc11)&& !disc22.equals(d21) && !disc33.equals(d21) && !disc44.equals(d21) && !disc55.equals(d21)){
           disc1_prof.setText(d21);
           asd=d21;
       }else if(!"".equals(d22) && "".equals(disc11)&& !disc22.equals(d22) && !disc33.equals(d22) && !disc44.equals(d22) && !disc55.equals(d22)){
           disc1_prof.setText(d22);
           asd=d22;
       }else if(!"".equals(d23) && "".equals(disc11)&& !disc22.equals(d23) && !disc33.equals(d23) && !disc44.equals(d23) && !disc55.equals(d23)){
           disc1_prof.setText(d23);
           asd=d23;
       }else if(!"".equals(d24) && "".equals(disc11)&& !disc22.equals(d24) && !disc33.equals(d24) && !disc44.equals(d24) && !disc55.equals(d24)){
           disc1_prof.setText(d24);
           asd=d24;
       }else if(!"".equals(d25) && "".equals(disc11)&& !disc22.equals(d25) && !disc33.equals(d25) && !disc44.equals(d25) && !disc55.equals(d25)){
           disc1_prof.setText(d25);
           asd=d25;
       }else if(!"".equals(d26) && "".equals(disc11)&& !disc22.equals(d26) && !disc33.equals(d26) && !disc44.equals(d26) && !disc55.equals(d26)){
           disc1_prof.setText(d26);
           asd=d26;
       }
         
         
         
      
       //     Alocaçao de apagar
else if("".equals(d1) && a==1 && disc11.equals(Porenquanto.getM1ant())){
           disc1_prof.setText("");
}else if("".equals(d2) && b==1 && disc11.equals(Porenquanto.getM2ant())){
           disc1_prof.setText("");    
}else if("".equals(d3) && c==1 && disc11.equals(Porenquanto.getM3ant())){
           disc1_prof.setText("");    
}else if("".equals(d4) && d==1 && disc11.equals(Porenquanto.getM4ant())){
           disc1_prof.setText("");    
}else if("".equals(d5) && e==1 && disc11.equals(Porenquanto.getM5ant())){
           disc1_prof.setText("");    
}else if("".equals(d6) && f==1 && disc11.equals(Porenquanto.getM6ant())){
           disc1_prof.setText("");    
}else if("".equals(d7) && g==1 && disc11.equals(Porenquanto.getM7ant())){
           disc1_prof.setText("");    
}else if("".equals(d8) && h==1 && disc11.equals(Porenquanto.getM8ant())){
           disc1_prof.setText("");    
}else if("".equals(d9) && i==1 && disc11.equals(Porenquanto.getM9ant())){
           disc1_prof.setText("");    
}else if("".equals(d10) && j==1 && disc11.equals(Porenquanto.getM10ant())){
           disc1_prof.setText("");    
}else if("".equals(d11) && k==1 && disc11.equals(Porenquanto.getM11ant())){
           disc1_prof.setText("");    
}else if("".equals(d12) && l==1 && disc11.equals(Porenquanto.getM12ant())){
           disc1_prof.setText("");    
}else if("".equals(d13) && m==1 && disc11.equals(Porenquanto.getM13ant())){
           disc1_prof.setText("");    
}else if("".equals(d14) && n==1 && disc11.equals(Porenquanto.getM14ant())){
           disc1_prof.setText("");    
}else if("".equals(d15) && o==1 && disc11.equals(Porenquanto.getM15ant())){
           disc1_prof.setText("");    
}else if("".equals(d16) && p==1 && disc11.equals(Porenquanto.getM16ant())){
           disc1_prof.setText("");    
}else if("".equals(d17) && q==1 && disc11.equals(Porenquanto.getM17ant())){
           disc1_prof.setText("");    
}else if("".equals(d18) && r==1 && disc11.equals(Porenquanto.getM18ant())){
           disc1_prof.setText("");    
}else if("".equals(d19) && s==1 && disc11.equals(Porenquanto.getM19ant())){
           disc1_prof.setText("");    
}else if("".equals(d20) && t==1 && disc11.equals(Porenquanto.getM20ant())){
           disc1_prof.setText("");    
}else if("".equals(d21) && u==1 && disc11.equals(Porenquanto.getM21ant())){
           disc1_prof.setText("");    
}else if("".equals(d22) && v==1 && disc11.equals(Porenquanto.getM22ant())){
           disc1_prof.setText("");    
}else if("".equals(d23) && w==1 && disc11.equals(Porenquanto.getM23ant())){
           disc1_prof.setText("");    
}else if("".equals(d24) && x==1 && disc11.equals(Porenquanto.getM24ant())){
           disc1_prof.setText("");    
}else if("".equals(d25) && y==1 && disc11.equals(Porenquanto.getM25ant())){
           disc1_prof.setText("");    
}else if("".equals(d26) && z==1 && disc11.equals(Porenquanto.getM26ant())){
           disc1_prof.setText("");    
}  
         
         
 
    }

    private void disc2() {
        
 if("".equals(disc22) && !asd.equals(d1)  && !"".equals(disc11) && !"".equals(d1)&& !disc11.equals(d1) && !disc33.equals(d1) && !disc44.equals(d1)  && !disc55.equals(d1)){
           disc2_prof.setText(d1);
           asd2=d1;
       }else if("".equals(disc22) && !"".equals(disc11) && !asd.equals(d2)  && !"".equals(d2)&& !disc11.equals(d2) && !disc33.equals(d2) && !disc44.equals(d2) && !disc55.equals(d2)){
           disc2_prof.setText(d2);
           asd2=d2;
       }else if("".equals(disc22) && !asd.equals(d3) && !"".equals(disc11)&& !"".equals(d3)&& !disc11.equals(d3) && !disc33.equals(d3) && !disc44.equals(d3) && !disc55.equals(d3)){
           disc2_prof.setText(d3);  
           asd2=d3;
       }else if("".equals(disc22) && !asd.equals(d4) && !"".equals(disc11) && !"".equals(d4)&& !disc11.equals(d4) && !disc33.equals(d4) && !disc44.equals(d4) && !disc55.equals(d4)){
           disc2_prof.setText(d4);
           asd2=d4;
       }else if("".equals(disc22) && !asd.equals(d5) && !"".equals(disc11)&& !"".equals(d5)&& !disc11.equals(d5) && !disc33.equals(d5) && !disc44.equals(d5) && !disc55.equals(d5)){
           disc2_prof.setText(d5);
           asd2=d5;
       }else if("".equals(disc22) && !asd.equals(d6) && !"".equals(disc11)&& !"".equals(d6)&& !disc11.equals(d6) && !disc33.equals(d6) && !disc44.equals(d6) && !disc55.equals(d6)){
           disc2_prof.setText(d6);
           asd2=d6;
       }else if("".equals(disc22) && !asd.equals(d7) && !"".equals(disc11)&& !"".equals(d7)&& !disc11.equals(d7) && !disc33.equals(d7) && !disc44.equals(d7) && !disc55.equals(d7)){
           disc2_prof.setText(d7);
           asd2=d7;
       }else if("".equals(disc22) && !asd.equals(d8) && !d8.equals(disc11) && !"".equals(disc11)&& !"".equals(d8)&& !disc11.equals(d8) && !disc33.equals(d8) && !disc44.equals(d8) && !disc55.equals(d8)){
           disc2_prof.setText(d8);
           asd2=d8;
       }else if("".equals(disc22) && !asd.equals(d9) && !d9.equals(disc11) && !"".equals(disc11)&& !"".equals(d9)&& !disc11.equals(d9) && !disc33.equals(d9) && !disc44.equals(d9) && !disc55.equals(d9)){
           disc2_prof.setText(d9);
           asd2=d9;
       }else if("".equals(disc22) && !asd.equals(d10) && !d10.equals(disc11) && !"".equals(disc11)&& !"".equals(d10)&& !disc11.equals(d10) && !disc33.equals(d10) && !disc44.equals(d10) && !disc55.equals(d10)){
           disc2_prof.setText(d10);
           asd2=d10;
       }else if("".equals(disc22) && !asd.equals(d11) && !d11.equals(disc11) && !"".equals(disc11)&& !"".equals(d11)&& !disc11.equals(d11) && !disc33.equals(d11) && !disc44.equals(d11) && !disc55.equals(d11)){
           disc2_prof.setText(d11);
           asd2=d11;
       }else if("".equals(disc22) && !asd.equals(d12) && !d12.equals(disc11) && !"".equals(disc11)&& !"".equals(d12)&& !disc11.equals(d12) && !disc33.equals(d12) && !disc44.equals(d12) && !disc55.equals(d12)){
           disc2_prof.setText(d12);
           asd2=d12;
       }else if("".equals(disc22) && !asd.equals(d13) && !d13.equals(disc11) && !"".equals(disc11)&& !"".equals(d13)&& !disc11.equals(d13) && !disc33.equals(d13) && !disc44.equals(d13) && !disc55.equals(d13)){
           disc2_prof.setText(d13);
           asd2=d13;
       }else if("".equals(disc22) && !asd.equals(d14) && !d14.equals(disc11) && !"".equals(disc11)&& !"".equals(d14)&& !disc11.equals(d14) && !disc33.equals(d14) && !disc44.equals(d14) && !disc55.equals(d14)){
           disc2_prof.setText(d14);
           asd2=d14;
       }else if("".equals(disc22) && !asd.equals(d15) && !d15.equals(disc11) && !"".equals(disc11)&& !"".equals(d15)&& !disc11.equals(d15) && !disc33.equals(d15) && !disc44.equals(d15) && !disc55.equals(d15)){
           disc2_prof.setText(d15);
           asd2=d15;
       }else if("".equals(disc22) && !asd.equals(d16) && !d16.equals(disc11) && !"".equals(disc11)&& !"".equals(d16)&& !disc11.equals(d16) && !disc33.equals(d16) && !disc44.equals(d16) && !disc55.equals(d16)){
           disc2_prof.setText(d16);
           asd2=d16;
       }else if("".equals(disc22) && !asd.equals(d17) && !d17.equals(disc11) && !"".equals(disc11)&& !"".equals(d17)&& !disc11.equals(d17) && !disc33.equals(d17) && !disc44.equals(d17) && !disc55.equals(d17)){
           disc2_prof.setText(d17);
           asd2=d17;
       }else if("".equals(disc22) && !asd.equals(d18) && !d18.equals(disc11) && !"".equals(disc11)&& !"".equals(d18)&& !disc11.equals(d18) && !disc33.equals(d18) && !disc44.equals(d18) && !disc55.equals(d18)){
           disc2_prof.setText(d18);
           asd2=d18;
       }else if("".equals(disc22) && !asd.equals(d19) && !d19.equals(disc11) && !"".equals(disc11)&& !"".equals(d19)&& !disc11.equals(d19) && !disc33.equals(d19) && !disc44.equals(d19) && !disc55.equals(d19)){
           disc2_prof.setText(d19);
           asd2=d19;
       }else if("".equals(disc22) && !asd.equals(d20) && !d20.equals(disc11) && !"".equals(disc11)&& !"".equals(d20)&& !disc11.equals(d20) && !disc33.equals(d20) && !disc44.equals(d20) && !disc55.equals(d20)){
           disc2_prof.setText(d20);
           asd2=d20;
       }else if("".equals(disc22) && !asd.equals(d21) && !d21.equals(disc11) && !"".equals(disc11)&& !"".equals(d21)&& !disc11.equals(d21) && !disc33.equals(d21) && !disc44.equals(d21) && !disc55.equals(d21)){
           disc2_prof.setText(d21);
           asd2=d21;
       }else if("".equals(disc22) && !asd.equals(d22) && !d22.equals(disc11) && !"".equals(disc11)&& !"".equals(d22)&& !disc11.equals(d22) && !disc33.equals(d22) && !disc44.equals(d22) && !disc55.equals(d22)){
           disc2_prof.setText(d22);
           asd2=d22;
       }else if("".equals(disc22) && !asd.equals(d23) && !d23.equals(disc11) && !"".equals(disc11)&& !"".equals(d23)&& !disc11.equals(d23) && !disc33.equals(d23) && !disc44.equals(d23) && !disc55.equals(d23)){
           disc2_prof.setText(d23);
           asd2=d23;
       }else if("".equals(disc22) && !asd.equals(d24) && !d24.equals(disc11) && !"".equals(disc11)&& !"".equals(d24)&& !disc11.equals(d24) && !disc33.equals(d24) && !disc44.equals(d24) && !disc55.equals(d24)){
           disc2_prof.setText(d24);
           asd2=d24;
       }else if("".equals(disc22) && !asd.equals(d25) && !d25.equals(disc11) && !"".equals(disc11)&& !"".equals(d25)&& !disc11.equals(d25) && !disc33.equals(d25) && !disc44.equals(d25) && !disc55.equals(d25)){
           disc2_prof.setText(d25);
           asd2=d25;
       }else if("".equals(disc22) && !asd.equals(d26) && !d26.equals(disc11) && !"".equals(disc11)&& !"".equals(d26)&& !disc11.equals(d26) && !disc33.equals(d26) && !disc44.equals(d26) && !disc55.equals(d26)){
           disc2_prof.setText(d26);
           asd2=d26;
       }        

        
        
    
        
 if("".equals(d1) && a==1 && disc22.equals(Porenquanto.getM1ant())){
           disc2_prof.setText("");
}else if("".equals(d2) && b==1 && disc22.equals(Porenquanto.getM2ant())){
           disc2_prof.setText("");    
}else if("".equals(d3) && c==1 && disc22.equals(Porenquanto.getM3ant())){
           disc2_prof.setText("");    
}else if("".equals(d4) && d==1 && disc22.equals(Porenquanto.getM4ant())){
           disc2_prof.setText("");    
}else if("".equals(d5) && e==1 && disc22.equals(Porenquanto.getM5ant())){
           disc2_prof.setText("");    
}else if("".equals(d6) && f==1 && disc22.equals(Porenquanto.getM6ant())){
           disc2_prof.setText("");    
}else if("".equals(d7) && g==1 && disc22.equals(Porenquanto.getM7ant())){
           disc2_prof.setText("");   
}else if("".equals(d8) && h==1 && disc22.equals(Porenquanto.getM8ant())){
           disc2_prof.setText("");    
}else if("".equals(d9) && i==1 && disc22.equals(Porenquanto.getM9ant())){
           disc2_prof.setText("");    
}else if("".equals(d10) && j==1 && disc22.equals(Porenquanto.getM10ant())){
           disc2_prof.setText("");    
}else if("".equals(d11) && k==1 && disc22.equals(Porenquanto.getM11ant())){
           disc2_prof.setText("");    
}else if("".equals(d12) && l==1 && disc22.equals(Porenquanto.getM12ant())){
           disc2_prof.setText("");    
}else if("".equals(d13) && m==1 && disc22.equals(Porenquanto.getM13ant())){
           disc2_prof.setText("");    
}else if("".equals(d14) && n==1 && disc22.equals(Porenquanto.getM14ant())){
           disc2_prof.setText("");    
}else if("".equals(d15) && o==1 && disc22.equals(Porenquanto.getM15ant())){
           disc2_prof.setText("");    
}else if("".equals(d16) && p==1 && disc22.equals(Porenquanto.getM16ant())){
           disc2_prof.setText("");    
}else if("".equals(d17) && q==1 && disc22.equals(Porenquanto.getM17ant())){
           disc2_prof.setText("");    
}else if("".equals(d17) && r==1 && disc22.equals(Porenquanto.getM18ant())){
           disc2_prof.setText("");    
}else if("".equals(d19) && s==1 && disc22.equals(Porenquanto.getM19ant())){
           disc2_prof.setText("");    
}else if("".equals(d20) && t==1 && disc22.equals(Porenquanto.getM20ant())){
           disc2_prof.setText("");    
}else if("".equals(d21) && u==1 && disc22.equals(Porenquanto.getM21ant())){
           disc2_prof.setText("");    
}else if("".equals(d22) && v==1 && disc22.equals(Porenquanto.getM22ant())){
           disc2_prof.setText("");    
}else if("".equals(d23) && w==1 && disc22.equals(Porenquanto.getM23ant())){
           disc2_prof.setText("");    
}else if("".equals(d24) && x==1 && disc22.equals(Porenquanto.getM24ant())){
           disc2_prof.setText("");    
}else if("".equals(d25) && y==1 && disc22.equals(Porenquanto.getM25ant())){
           disc2_prof.setText("");    
}else if("".equals(d26) && z==1 && disc22.equals(Porenquanto.getM26ant())){
           disc2_prof.setText("");    
}
    }

    private void disc3() {
         if("".equals(disc33) && !asd.equals(d1) && !asd2.equals(d1) &&  !"".equals(disc11) && !"".equals(disc22) && !"".equals(d1)&& !disc11.equals(d1) && !disc22.equals(d1) && !disc44.equals(d1) && !disc55.equals(d1)){
           disc3_prof.setText(d1);
           asd3=d1;
       }else if("".equals(disc33)  &&  !"".equals(disc11) && !"".equals(disc22)&& !"".equals(d2) && !asd.equals(d2) && !asd2.equals(d2)&& !disc11.equals(d2) && !disc22.equals(d2) && !disc44.equals(d2) && !disc55.equals(d2) ){
           disc3_prof.setText(d2);
           asd3=d2;
       }else if("".equals(disc33) &&  !"".equals(disc11) && !"".equals(disc22)&& !"".equals(d3) && !asd.equals(d3) && !asd2.equals(d3)&& !disc11.equals(d3) && !disc22.equals(d3) && !disc44.equals(d3) && !disc55.equals(d3)){
           disc3_prof.setText(d3);
           asd3=d3;
       }else if("".equals(disc33) &&  !"".equals(disc11) && !"".equals(disc22)&& !"".equals(d4) && !asd.equals(d4) && !asd2.equals(d4)&& !disc11.equals(d4) && !disc22.equals(d4) && !disc44.equals(d4) && !disc55.equals(d4)){
           disc3_prof.setText(d4);
           asd3=d4;
       }else if("".equals(disc33) &&  !"".equals(disc11) && !"".equals(disc22)&& !"".equals(d5) && !asd.equals(d5) && !asd2.equals(d5)&& !disc11.equals(d5) && !disc22.equals(d5) && !disc44.equals(d5) && !disc55.equals(d5)){
           disc3_prof.setText(d5);
           asd3=d5;
       }else if("".equals(disc33) &&  !"".equals(disc11) && !"".equals(disc22)&& !"".equals(d6) && !asd.equals(d6) && !asd2.equals(d6)&& !disc11.equals(d6) && !disc22.equals(d6) && !disc44.equals(d6) && !disc55.equals(d6)){
           disc3_prof.setText(d6);
           asd3=d6;
       }else if("".equals(disc33) &&  !"".equals(disc11) && !"".equals(disc22)&& !"".equals(d7) && !asd.equals(d7) && !asd2.equals(d7)&& !disc11.equals(d7) && !disc22.equals(d7) && !disc44.equals(d7) && !disc55.equals(d7)){
           disc3_prof.setText(d7);
           asd3=d7;
       }else if("".equals(disc33) &&  !"".equals(disc11) && !"".equals(disc22)&& !"".equals(d8) && !asd.equals(d8) && !asd2.equals(d8)&& !disc11.equals(d8) && !disc22.equals(d8) && !disc44.equals(d8) && !disc55.equals(d8)){
           disc3_prof.setText(d8);
           asd3=d8;
       }else if("".equals(disc33) &&  !"".equals(disc11) && !"".equals(disc22)&& !"".equals(d9) && !asd.equals(d9) && !asd2.equals(d9)&& !disc11.equals(d9) && !disc22.equals(d9) && !disc44.equals(d9) && !disc55.equals(d9)){
           disc3_prof.setText(d9);
           asd3=d9;
       }else if("".equals(disc33) &&  !"".equals(disc11) && !"".equals(disc22)&& !"".equals(d10) && !asd.equals(d10) && !asd2.equals(d10)&& !disc11.equals(d10) && !disc22.equals(d10) && !disc44.equals(d10) && !disc55.equals(d10)){
           disc3_prof.setText(d10);
           asd3=d10;
       }else if("".equals(disc33) &&  !"".equals(disc11) && !"".equals(disc22)&& !"".equals(d11) && !asd.equals(d11) && !asd2.equals(d11)&& !disc11.equals(d11) && !disc22.equals(d11) && !disc44.equals(d11) && !disc55.equals(d11)){
           disc3_prof.setText(d11);
           asd3=d11;
       }else if("".equals(disc33) &&  !"".equals(disc11) && !"".equals(disc22)&& !"".equals(d12) && !asd.equals(d12) && !asd2.equals(d12)&& !disc11.equals(d12) && !disc22.equals(d12) && !disc44.equals(d12) && !disc55.equals(d12)){
           disc3_prof.setText(d12);
           asd3=d12;
       }else if("".equals(disc33) &&  !"".equals(disc11) && !"".equals(disc22)&& !"".equals(d13) && !asd.equals(d13) && !asd2.equals(d13)&& !disc11.equals(d13) && !disc22.equals(d13) && !disc44.equals(d13) && !disc55.equals(d13)){
           disc3_prof.setText(d13);
           asd3=d13;
       }else if("".equals(disc33) &&  !"".equals(disc11) && !"".equals(disc22)&& !"".equals(d14) && !asd.equals(d14) && !asd2.equals(d14)&& !disc11.equals(d14) && !disc22.equals(d14) && !disc44.equals(d14) && !disc55.equals(d14)){
           disc3_prof.setText(d14);
           asd3=d14;
       }else if("".equals(disc33) &&  !"".equals(disc11) && !"".equals(disc22)&& !"".equals(d15) && !asd.equals(d15) && !asd2.equals(d15)&& !disc11.equals(d15) && !disc22.equals(d15) && !disc44.equals(d15) && !disc55.equals(d15)){
           disc3_prof.setText(d15);
           asd3=d15;
       }else if("".equals(disc33) &&  !"".equals(disc11) && !"".equals(disc22)&& !"".equals(d16) && !asd.equals(d16) && !asd2.equals(d16)&& !disc11.equals(d16) && !disc22.equals(d16) && !disc44.equals(d16) && !disc55.equals(d16)){
           disc3_prof.setText(d16);
           asd3=d16;
       }else if("".equals(disc33) &&  !"".equals(disc11) && !"".equals(disc22)&& !"".equals(d17) && !asd.equals(d17) && !asd2.equals(d17)&& !disc11.equals(d17) && !disc22.equals(d17) && !disc44.equals(d17) && !disc55.equals(d17)){
           disc3_prof.setText(d17);
           asd3=d17;
       }else if("".equals(disc33) &&  !"".equals(disc11) && !"".equals(disc22)&& !"".equals(d18) && !asd.equals(d18) && !asd2.equals(d18)&& !disc11.equals(d18) && !disc22.equals(d18) && !disc44.equals(d18) && !disc55.equals(d18)){
           disc3_prof.setText(d18);
           asd3=d18;
       }else if("".equals(disc33) &&  !"".equals(disc11) && !"".equals(disc22)&& !"".equals(d19) && !asd.equals(d19) && !asd2.equals(d19)&& !disc11.equals(d19) && !disc22.equals(d19) && !disc44.equals(d19) && !disc55.equals(d19)){
           disc3_prof.setText(d19);
           asd3=d19;
       }else if("".equals(disc33) &&  !"".equals(disc11) && !"".equals(disc22)&& !"".equals(d20) && !asd.equals(d20) && !asd2.equals(d20)&& !disc11.equals(d20) && !disc22.equals(d20) && !disc44.equals(d20) && !disc55.equals(d20)){
           disc3_prof.setText(d20);
           asd3=d20;
       }else if("".equals(disc33) &&  !"".equals(disc11) && !"".equals(disc22)&& !"".equals(d21) && !asd.equals(d21) && !asd2.equals(d21)&& !disc11.equals(d21) && !disc22.equals(d21) && !disc44.equals(d21) && !disc55.equals(d21)){
           disc3_prof.setText(d21);
           asd3=d21;
       }else if("".equals(disc33) &&  !"".equals(disc11) && !"".equals(disc22)&& !"".equals(d22) && !asd.equals(d22) && !asd2.equals(d22)&& !disc11.equals(d22) && !disc22.equals(d22) && !disc44.equals(d22) && !disc55.equals(d22)){
           disc3_prof.setText(d22);
           asd3=d22;
       }else if("".equals(disc33) &&  !"".equals(disc11) && !"".equals(disc22)&& !"".equals(d23) && !asd.equals(d23) && !asd2.equals(d23)&& !disc11.equals(d23) && !disc22.equals(d23) && !disc44.equals(d23) && !disc55.equals(d23)){
           disc3_prof.setText(d23);
           asd3=d23;
       }else if("".equals(disc33) &&  !"".equals(disc11) && !"".equals(disc22)&& !"".equals(d24) && !asd.equals(d24) && !asd2.equals(d24)&& !disc11.equals(d24) && !disc22.equals(d24) && !disc44.equals(d24) && !disc55.equals(d24)){
           disc3_prof.setText(d24);
           asd3=d24;
       }else if("".equals(disc33) &&  !"".equals(disc11) && !"".equals(disc22)&& !"".equals(d25) && !asd.equals(d25) && !asd2.equals(d25)&& !disc11.equals(d25) && !disc22.equals(d25) && !disc44.equals(d25) && !disc55.equals(d25)){
           disc3_prof.setText(d25);
           asd3=d25;
       }else if("".equals(disc33) &&  !"".equals(disc11) && !"".equals(disc22)&& !"".equals(d26) && !asd.equals(d26) && !asd2.equals(d26)&& !disc11.equals(d26) && !disc22.equals(d26) && !disc44.equals(d26) && !disc55.equals(d26)){
           disc3_prof.setText(d26);
           asd3=d26;
       }
         
         
       else if("".equals(d1) && a==1 && disc33.equals(Porenquanto.getM1ant())){
           disc3_prof.setText("");
}else if("".equals(d2) && b==1 && disc33.equals(Porenquanto.getM2ant())){
           disc3_prof.setText("");    
}else if("".equals(d3) && c==1 && disc33.equals(Porenquanto.getM3ant())){
           disc3_prof.setText("");    
}else if("".equals(d4) && d==1 && disc33.equals(Porenquanto.getM4ant())){
           disc3_prof.setText("");    
}else if("".equals(d5) && e==1 && disc33.equals(Porenquanto.getM5ant())){
           disc3_prof.setText("");    
}else if("".equals(d6) && f==1 && disc33.equals(Porenquanto.getM6ant())){
           disc3_prof.setText("");    
}else if("".equals(d7) && g==1 && disc33.equals(Porenquanto.getM7ant())){
           disc3_prof.setText("");   
}else if("".equals(d8) && h==1 && disc33.equals(Porenquanto.getM8ant())){
           disc3_prof.setText("");    
}else if("".equals(d9) && i==1 && disc33.equals(Porenquanto.getM9ant())){
           disc3_prof.setText("");    
}else if("".equals(d10) && j==1 && disc33.equals(Porenquanto.getM10ant())){
           disc3_prof.setText("");    
}else if("".equals(d11) && k==1 && disc33.equals(Porenquanto.getM11ant())){
           disc3_prof.setText("");    
}else if("".equals(d12) && l==1 && disc33.equals(Porenquanto.getM12ant())){
           disc3_prof.setText("");    
}else if("".equals(d13) && m==1 && disc33.equals(Porenquanto.getM13ant())){
           disc3_prof.setText("");    
}else if("".equals(d14) && n==1 && disc33.equals(Porenquanto.getM14ant())){
           disc3_prof.setText("");    
}else if("".equals(d15) && o==1 && disc33.equals(Porenquanto.getM15ant())){
           disc3_prof.setText("");    
}else if("".equals(d16) && p==1 && disc33.equals(Porenquanto.getM16ant())){
           disc3_prof.setText("");    
}else if("".equals(d17) && q==1 && disc33.equals(Porenquanto.getM17ant())){
           disc3_prof.setText("");    
}else if("".equals(d17) && r==1 && disc33.equals(Porenquanto.getM18ant())){
           disc3_prof.setText("");    
}else if("".equals(d19) && s==1 && disc33.equals(Porenquanto.getM19ant())){
           disc3_prof.setText("");    
}else if("".equals(d20) && t==1 && disc33.equals(Porenquanto.getM20ant())){
           disc3_prof.setText("");    
}else if("".equals(d21) && u==1 && disc33.equals(Porenquanto.getM21ant())){
           disc3_prof.setText("");    
}else if("".equals(d22) && v==1 && disc33.equals(Porenquanto.getM22ant())){
           disc3_prof.setText("");    
}else if("".equals(d23) && w==1 && disc33.equals(Porenquanto.getM23ant())){
           disc3_prof.setText("");    
}else if("".equals(d24) && x==1 && disc33.equals(Porenquanto.getM24ant())){
           disc3_prof.setText("");    
}else if("".equals(d25) && y==1 && disc33.equals(Porenquanto.getM25ant())){
           disc3_prof.setText("");    
}else if("".equals(d26) && z==1 && disc33.equals(Porenquanto.getM26ant())){
           disc3_prof.setText("");    
}
         
    }

    private void disc4() {
        if("".equals(disc44) && !asd.equals(d1) && !asd2.equals(d1) && !asd3.equals(d1) && !"".equals(disc11) && !"".equals(disc22) && !"".equals(d1) && !disc11.equals(d1) && !disc22.equals(d1) && !disc33.equals(d1) && !disc55.equals(d1)){
       disc4_prof.setText(d1);
       asd4=d1;
       }else if("".equals(disc44) &&  !"".equals(disc11) && !"".equals(disc22) && !"".equals(disc33) && !"".equals(d2) && !asd.equals(d2) && !asd2.equals(d2) && !asd3.equals(d2)&& !disc11.equals(d2) && !disc22.equals(d2) && !disc33.equals(d2) && !disc55.equals(d2)){
       disc4_prof.setText(d2);
       asd4=d2;
       }else if("".equals(disc44) &&  !"".equals(disc11) && !"".equals(disc22) && !"".equals(disc33) && !"".equals(d3) && !asd.equals(d3) && !asd2.equals(d3) && !asd3.equals(d3)&& !disc11.equals(d3) && !disc22.equals(d3) && !disc33.equals(d3) && !disc55.equals(d3)){
       disc4_prof.setText(d3);
       asd4=d3;
       }else if("".equals(disc44) &&  !"".equals(disc11) && !"".equals(disc22) && !"".equals(disc33) && !"".equals(d4) && !asd.equals(d4) && !asd2.equals(d4) && !asd3.equals(d4)&& !disc11.equals(d4) && !disc22.equals(d4) && !disc33.equals(d4) && !disc55.equals(d4)){
       disc4_prof.setText(d4);
       asd4=d4;
       }else if("".equals(disc44) &&  !"".equals(disc11) && !"".equals(disc22) && !"".equals(disc33) && !"".equals(d5) && !asd.equals(d5) && !asd2.equals(d5) && !asd3.equals(d5)&& !disc11.equals(d5) && !disc22.equals(d5) && !disc33.equals(d5) && !disc55.equals(d5)){
       disc4_prof.setText(d5);
       asd4=d5;
       }else if("".equals(disc44) &&  !"".equals(disc11) && !"".equals(disc22) && !"".equals(disc33) && !"".equals(d6) && !asd.equals(d6) && !asd2.equals(d6) && !asd3.equals(d6)&& !disc11.equals(d6) && !disc22.equals(d6) && !disc33.equals(d6) && !disc55.equals(d6)){
       disc4_prof.setText(d6);
       asd4=d6;
        System.out.println(d6);
       }else if("".equals(disc44) &&  !"".equals(disc11) && !"".equals(disc22) && !"".equals(disc33) && !"".equals(d7) && !asd.equals(d7) && !asd2.equals(d7) && !asd3.equals(d7)&& !disc11.equals(d7) && !disc22.equals(d7) && !disc33.equals(d7) && !disc55.equals(d7)){
       disc4_prof.setText(d7);
       asd4=d7;
       }else if("".equals(disc44) &&  !"".equals(disc11) && !"".equals(disc22) && !"".equals(disc33) && !"".equals(d8) && !asd.equals(d8) && !asd2.equals(d8) && !asd3.equals(d8)&& !disc11.equals(d8) && !disc22.equals(d8) && !disc33.equals(d8) && !disc55.equals(d8)){
       disc4_prof.setText(d8);
       asd4=d8;
       }else if("".equals(disc44) &&  !"".equals(disc11) && !"".equals(disc22) && !"".equals(disc33) && !"".equals(d9) && !asd.equals(d9) && !asd2.equals(d9) && !asd3.equals(d9)&& !disc11.equals(d9) && !disc22.equals(d9) && !disc33.equals(d9) && !disc55.equals(d9)){
       disc4_prof.setText(d9);
       asd4=d9;
       }else if("".equals(disc44) &&  !"".equals(disc11) && !"".equals(disc22) && !"".equals(disc33) && !"".equals(d10) && !asd.equals(d10) && !asd2.equals(d10) && !asd3.equals(d10)&& !disc11.equals(d10) && !disc22.equals(d10) && !disc33.equals(d10) && !disc55.equals(d10)){
       disc4_prof.setText(d10);
       asd4=d10;
       }else if("".equals(disc44) &&  !"".equals(disc11) && !"".equals(disc22) && !"".equals(disc33) && !"".equals(d11) && !asd.equals(d11) && !asd2.equals(d11) && !asd3.equals(d11)&& !disc11.equals(d11) && !disc22.equals(d11) && !disc33.equals(d11) && !disc55.equals(d11)){
       disc4_prof.setText(d11);
       asd4=d11;
       }else if("".equals(disc44) &&  !"".equals(disc11) && !"".equals(disc22) && !"".equals(disc33) && !"".equals(d12) && !asd.equals(d12) && !asd2.equals(d12) && !asd3.equals(d12)&& !disc11.equals(d12) && !disc22.equals(d12) && !disc33.equals(d12) && !disc55.equals(d12)){
       disc4_prof.setText(d12);
       asd4=d12;
       }else if("".equals(disc44) &&  !"".equals(disc11) && !"".equals(disc22) && !"".equals(disc33) && !"".equals(d13) && !asd.equals(d13) && !asd2.equals(d13) && !asd3.equals(d13)&& !disc11.equals(d13) && !disc22.equals(d13) && !disc33.equals(d13) && !disc55.equals(d13)){
       disc4_prof.setText(d13);
       asd4=d13;
       }else if("".equals(disc44) &&  !"".equals(disc11) && !"".equals(disc22) && !"".equals(disc33) && !"".equals(d14) && !asd.equals(d14) && !asd2.equals(d14) && !asd3.equals(d14)&& !disc11.equals(d14) && !disc22.equals(d14) && !disc33.equals(d14) && !disc55.equals(d14)){
       disc4_prof.setText(d14);
       asd4=d14;
       }else if("".equals(disc44) &&  !"".equals(disc11) && !"".equals(disc22) && !"".equals(disc33) && !"".equals(d15) && !asd.equals(d15) && !asd2.equals(d15) && !asd3.equals(d15)&& !disc11.equals(d15) && !disc22.equals(d15) && !disc33.equals(d15) && !disc55.equals(d15)){
       disc4_prof.setText(d15);
       asd4=d15;
       }else if("".equals(disc44) &&  !"".equals(disc11) && !"".equals(disc22) && !"".equals(disc33) && !"".equals(d16) && !asd.equals(d16) && !asd2.equals(d16) && !asd3.equals(d16)&& !disc11.equals(d16) && !disc22.equals(d16) && !disc33.equals(d16) && !disc55.equals(d16)){
       disc4_prof.setText(d16);
       asd4=d16;
       }else if("".equals(disc44) &&  !"".equals(disc11) && !"".equals(disc22) && !"".equals(disc33) && !"".equals(d17) && !asd.equals(d17) && !asd2.equals(d17) && !asd3.equals(d17)&& !disc11.equals(d17) && !disc22.equals(d17) && !disc33.equals(d17) && !disc55.equals(d17)){
       disc4_prof.setText(d17);
       asd4=d17;
       }else if("".equals(disc44) &&  !"".equals(disc11) && !"".equals(disc22) && !"".equals(disc33) && !"".equals(d18) && !asd.equals(d18) && !asd2.equals(d18) && !asd3.equals(d18)&& !disc11.equals(d18) && !disc22.equals(d18) && !disc33.equals(d18) && !disc55.equals(d18)){
       disc4_prof.setText(d18);
       asd4=d18;
       }else if("".equals(disc44) &&  !"".equals(disc11) && !"".equals(disc22) && !"".equals(disc33) && !"".equals(d19) && !asd.equals(d19) && !asd2.equals(d19) && !asd3.equals(d19)&& !disc11.equals(d19) && !disc22.equals(d19) && !disc33.equals(d19) && !disc55.equals(d19)){
       disc4_prof.setText(d19);
       asd4=d19;
       }else if("".equals(disc44) &&  !"".equals(disc11) && !"".equals(disc22) && !"".equals(disc33) && !"".equals(d20) && !asd.equals(d20) && !asd2.equals(d20) && !asd3.equals(d20)&& !disc11.equals(d20) && !disc22.equals(d20) && !disc33.equals(d20) && !disc55.equals(d20)){
       disc4_prof.setText(d20);
       asd4=d20;
       }else if("".equals(disc44) &&  !"".equals(disc11) && !"".equals(disc22) && !"".equals(disc33) && !"".equals(d21) && !asd.equals(d21) && !asd2.equals(d21) && !asd3.equals(d21)&& !disc11.equals(d21) && !disc22.equals(d21) && !disc33.equals(d21) && !disc55.equals(d21)){
       disc4_prof.setText(d21);
       asd4=d21;
       }else if("".equals(disc44) &&  !"".equals(disc11) && !"".equals(disc22) && !"".equals(disc33) && !"".equals(d22) && !asd.equals(d22) && !asd2.equals(d22) && !asd3.equals(d22)&& !disc11.equals(d22) && !disc22.equals(d22) && !disc33.equals(d22) && !disc55.equals(d22)){
       disc4_prof.setText(d22);
       asd4=d22;
       }else if("".equals(disc44) &&  !"".equals(disc11) && !"".equals(disc22) && !"".equals(disc33) && !"".equals(d23) && !asd.equals(d23) && !asd2.equals(d23) && !asd3.equals(d23)&& !disc11.equals(d23) && !disc22.equals(d23) && !disc33.equals(d23) && !disc55.equals(d23)){
       disc4_prof.setText(d23);
       asd4=d23;
       }else if("".equals(disc44) &&  !"".equals(disc11) && !"".equals(disc22) && !"".equals(disc33) && !"".equals(d24) && !asd.equals(d24) && !asd2.equals(d24) && !asd3.equals(d24)&& !disc11.equals(d24) && !disc22.equals(d24) && !disc33.equals(d24) && !disc55.equals(d24)){
       disc4_prof.setText(d24);
       asd4=d24;
       }else if("".equals(disc44) &&  !"".equals(disc11) && !"".equals(disc22) && !"".equals(disc33) && !"".equals(d25) && !asd.equals(d25) && !asd2.equals(d25) && !asd3.equals(d25)&& !disc11.equals(d25) && !disc22.equals(d25) && !disc33.equals(d25) && !disc55.equals(d25)){
       disc4_prof.setText(d25);
       asd4=d25;
       }else if("".equals(disc44) &&  !"".equals(disc11) && !"".equals(disc22) && !"".equals(disc33) && !"".equals(d26) && !asd.equals(d26) && !asd2.equals(d26) && !asd3.equals(d26)&& !disc11.equals(d26) && !disc22.equals(d26) && !disc33.equals(d26) && !disc55.equals(d26)){
       disc4_prof.setText(d26);
       asd4=d6;
       }
        
        
         else if("".equals(d1) && a==1 && disc44.equals(Porenquanto.getM1ant())){
           disc4_prof.setText("");
}else if("".equals(d2) && b==1 && disc44.equals(Porenquanto.getM2ant())){
           disc4_prof.setText("");    
}else if("".equals(d3) && c==1 && disc44.equals(Porenquanto.getM3ant())){
           disc4_prof.setText("");    
}else if("".equals(d4) && d==1 && disc44.equals(Porenquanto.getM4ant())){
           disc4_prof.setText("");    
}else if("".equals(d5) && e==1 && disc44.equals(Porenquanto.getM5ant())){
           disc4_prof.setText("");    
}else if("".equals(d6) && f==1 && disc44.equals(Porenquanto.getM6ant())){
           disc4_prof.setText("");    
}else if("".equals(d7) && g==1 && disc44.equals(Porenquanto.getM7ant())){
           disc4_prof.setText("");   
}else if("".equals(d8) && h==1 && disc44.equals(Porenquanto.getM8ant())){
           disc4_prof.setText("");    
}else if("".equals(d9) && i==1 && disc44.equals(Porenquanto.getM9ant())){
           disc4_prof.setText("");    
}else if("".equals(d10) && j==1 && disc44.equals(Porenquanto.getM10ant())){
           disc4_prof.setText("");    
}else if("".equals(d11) && k==1 && disc44.equals(Porenquanto.getM11ant())){
           disc4_prof.setText("");    
}else if("".equals(d12) && l==1 && disc44.equals(Porenquanto.getM12ant())){
           disc4_prof.setText("");    
}else if("".equals(d13) && m==1 && disc44.equals(Porenquanto.getM13ant())){
           disc4_prof.setText("");    
}else if("".equals(d14) && n==1 && disc44.equals(Porenquanto.getM14ant())){
           disc4_prof.setText("");    
}else if("".equals(d15) && o==1 && disc44.equals(Porenquanto.getM15ant())){
           disc4_prof.setText("");    
}else if("".equals(d16) && p==1 && disc44.equals(Porenquanto.getM16ant())){
           disc4_prof.setText("");    
}else if("".equals(d17) && q==1 && disc44.equals(Porenquanto.getM17ant())){
           disc4_prof.setText("");    
}else if("".equals(d17) && r==1 && disc44.equals(Porenquanto.getM18ant())){
           disc4_prof.setText("");    
}else if("".equals(d19) && s==1 && disc44.equals(Porenquanto.getM19ant())){
           disc4_prof.setText("");    
}else if("".equals(d20) && t==1 && disc44.equals(Porenquanto.getM20ant())){
           disc4_prof.setText("");    
}else if("".equals(d21) && u==1 && disc44.equals(Porenquanto.getM21ant())){
           disc4_prof.setText("");    
}else if("".equals(d22) && v==1 && disc44.equals(Porenquanto.getM22ant())){
           disc4_prof.setText("");    
}else if("".equals(d23) && w==1 && disc44.equals(Porenquanto.getM23ant())){
           disc4_prof.setText("");    
}else if("".equals(d24) && x==1 && disc44.equals(Porenquanto.getM24ant())){
           disc4_prof.setText("");   
}else if("".equals(d25) && y==1 && disc44.equals(Porenquanto.getM25ant())){
           disc4_prof.setText("");    
}else if("".equals(d26) && z==1 && disc44.equals(Porenquanto.getM26ant())){
           disc4_prof.setText("");    
}
    }
    
    private void disc5() {
        if("".equals(disc55) && !asd.equals(d1) && !asd2.equals(d1) && !asd3.equals(d1) && !asd4.equals(d1) && !"".equals(disc11) && !"".equals(disc22) && !"".equals(d1) && !disc11.equals(d1) && !disc22.equals(d1) && !disc33.equals(d1) && !disc44.equals(d1)){
       disc5_prof.setText(d1);
       }else if("".equals(disc55) &&  !"".equals(disc11) && !"".equals(disc22) && !"".equals(disc33) && !"".equals(d2) && !asd.equals(d2) && !asd2.equals(d2) && !asd3.equals(d2) && !asd4.equals(d2) && !disc11.equals(d2) && !disc22.equals(d2) && !disc33.equals(d2) && !disc44.equals(d2)){
       disc5_prof.setText(d2);
       }else if("".equals(disc55) &&  !"".equals(disc11) && !"".equals(disc22) && !"".equals(disc33) && !"".equals(d3) && !asd.equals(d3) && !asd2.equals(d3) && !asd3.equals(d3) && !asd4.equals(d3) && !disc11.equals(d3) && !disc22.equals(d3) && !disc33.equals(d3) && !disc44.equals(d3)){
       disc5_prof.setText(d3);
       }else if("".equals(disc55) &&  !"".equals(disc11) && !"".equals(disc22) && !"".equals(disc33) && !"".equals(d4) && !asd.equals(d4) && !asd2.equals(d4) && !asd3.equals(d4) && !asd4.equals(d4) && !disc11.equals(d4) && !disc22.equals(d4) && !disc33.equals(d4) && !disc44.equals(d4)){
       disc5_prof.setText(d4);
       }else if("".equals(disc55) &&  !"".equals(disc11) && !"".equals(disc22) && !"".equals(disc33) && !"".equals(d5) && !asd.equals(d5) && !asd2.equals(d5) && !asd3.equals(d5) && !asd4.equals(d5) && !disc11.equals(d5) && !disc22.equals(d5) && !disc33.equals(d5) && !disc44.equals(d5)){
       disc5_prof.setText(d5);
       }else if("".equals(disc55) &&  !"".equals(disc11) && !"".equals(disc22) && !"".equals(disc33) && !"".equals(d6) && !asd.equals(d6) && !asd2.equals(d6) && !asd3.equals(d6) && !asd4.equals(d6) && !disc11.equals(d6) && !disc22.equals(d6) && !disc33.equals(d6) && !disc44.equals(d6)){
       disc5_prof.setText(d6);
        System.out.println(d6);
       }else if("".equals(disc55) &&  !"".equals(disc11) && !"".equals(disc22) && !"".equals(disc33) && !"".equals(d7) && !asd.equals(d7) && !asd2.equals(d7) && !asd3.equals(d7) && !asd4.equals(d7) && !disc11.equals(d7) && !disc22.equals(d7) && !disc33.equals(d7) && !disc44.equals(d7)){
       disc5_prof.setText(d7);
       }else if("".equals(disc55) &&  !"".equals(disc11) && !"".equals(disc22) && !"".equals(disc33) && !"".equals(d8) && !asd.equals(d8) && !asd2.equals(d8) && !asd3.equals(d8) && !asd4.equals(d8) && !disc11.equals(d8) && !disc22.equals(d8) && !disc33.equals(d8) && !disc44.equals(d8)){
       disc5_prof.setText(d8);
       }else if("".equals(disc55) &&  !"".equals(disc11) && !"".equals(disc22) && !"".equals(disc33) && !"".equals(d9) && !asd.equals(d9) && !asd2.equals(d9) && !asd3.equals(d9) && !asd4.equals(d9) && !disc11.equals(d9) && !disc22.equals(d9) && !disc33.equals(d9) && !disc44.equals(d9)){
       disc5_prof.setText(d9);
       }else if("".equals(disc55) &&  !"".equals(disc11) && !"".equals(disc22) && !"".equals(disc33) && !"".equals(d10) && !asd.equals(d10) && !asd2.equals(d10) && !asd3.equals(d10) && !asd4.equals(d10) && !disc11.equals(d10) && !disc22.equals(d10) && !disc33.equals(d10) && !disc44.equals(d10)){
       disc5_prof.setText(d10);
       }else if("".equals(disc55) &&  !"".equals(disc11) && !"".equals(disc22) && !"".equals(disc33) && !"".equals(d11) && !asd.equals(d11) && !asd2.equals(d11) && !asd3.equals(d11) && !asd4.equals(d11) && !disc11.equals(d11) && !disc22.equals(d11) && !disc33.equals(d11) && !disc44.equals(d11)){
       disc5_prof.setText(d11);
       }else if("".equals(disc55) &&  !"".equals(disc11) && !"".equals(disc22) && !"".equals(disc33) && !"".equals(d12) && !asd.equals(d12) && !asd2.equals(d12) && !asd3.equals(d12) && !asd4.equals(d12) && !disc11.equals(d12) && !disc22.equals(d12) && !disc33.equals(d12) && !disc44.equals(d12)){
       disc5_prof.setText(d12);
       }else if("".equals(disc55) &&  !"".equals(disc11) && !"".equals(disc22) && !"".equals(disc33) && !"".equals(d13) && !asd.equals(d13) && !asd2.equals(d13) && !asd3.equals(d13) && !asd4.equals(d13) && !disc11.equals(d13) && !disc22.equals(d13) && !disc33.equals(d13) && !disc44.equals(d13)){
       disc5_prof.setText(d13);
       }else if("".equals(disc55) &&  !"".equals(disc11) && !"".equals(disc22) && !"".equals(disc33) && !"".equals(d14) && !asd.equals(d14) && !asd2.equals(d14) && !asd3.equals(d14) && !asd4.equals(d14) && !disc11.equals(d14) && !disc22.equals(d14) && !disc33.equals(d14) && !disc44.equals(d14)){
       disc5_prof.setText(d14);
       }else if("".equals(disc55) &&  !"".equals(disc11) && !"".equals(disc22) && !"".equals(disc33) && !"".equals(d15) && !asd.equals(d15) && !asd2.equals(d15) && !asd3.equals(d15) && !asd4.equals(d15) && !disc11.equals(d15) && !disc22.equals(d15) && !disc33.equals(d15) && !disc44.equals(d15)){
       disc5_prof.setText(d15);
       }else if("".equals(disc55) &&  !"".equals(disc11) && !"".equals(disc22) && !"".equals(disc33) && !"".equals(d16) && !asd.equals(d16) && !asd2.equals(d16) && !asd3.equals(d16) && !asd4.equals(d16) && !disc11.equals(d16) && !disc22.equals(d16) && !disc33.equals(d16) && !disc44.equals(d16)){
       disc5_prof.setText(d16);
       }else if("".equals(disc55) &&  !"".equals(disc11) && !"".equals(disc22) && !"".equals(disc33) && !"".equals(d17) && !asd.equals(d17) && !asd2.equals(d17) && !asd3.equals(d17) && !asd4.equals(d17) && !disc11.equals(d17) && !disc22.equals(d17) && !disc33.equals(d17) && !disc44.equals(d17)){
       disc5_prof.setText(d17);
       }else if("".equals(disc55) &&  !"".equals(disc11) && !"".equals(disc22) && !"".equals(disc33) && !"".equals(d18) && !asd.equals(d18) && !asd2.equals(d18) && !asd3.equals(d18) && !asd4.equals(d18) && !disc11.equals(d18) && !disc22.equals(d18) && !disc33.equals(d18) && !disc44.equals(d18)){
       disc5_prof.setText(d18);
       }else if("".equals(disc55) &&  !"".equals(disc11) && !"".equals(disc22) && !"".equals(disc33) && !"".equals(d19) && !asd.equals(d19) && !asd2.equals(d19) && !asd3.equals(d19) && !asd4.equals(d19) && !disc11.equals(d19) && !disc22.equals(d19) && !disc33.equals(d19) && !disc44.equals(d19)){
       disc5_prof.setText(d19);
       }else if("".equals(disc55) &&  !"".equals(disc11) && !"".equals(disc22) && !"".equals(disc33) && !"".equals(d20) && !asd.equals(d20) && !asd2.equals(d20) && !asd3.equals(d20) && !asd4.equals(d20) && !disc11.equals(d20) && !disc22.equals(d20) && !disc33.equals(d20) && !disc44.equals(d20)){
       disc5_prof.setText(d20);
       }else if("".equals(disc55) &&  !"".equals(disc11) && !"".equals(disc22) && !"".equals(disc33) && !"".equals(d21) && !asd.equals(d21) && !asd2.equals(d21) && !asd3.equals(d21) && !asd4.equals(d21) && !disc11.equals(d21) && !disc22.equals(d21) && !disc33.equals(d21) && !disc44.equals(d21)){
       disc5_prof.setText(d21);
       }else if("".equals(disc55) &&  !"".equals(disc11) && !"".equals(disc22) && !"".equals(disc33) && !"".equals(d22) && !asd.equals(d22) && !asd2.equals(d22) && !asd3.equals(d22) && !asd4.equals(d22) && !disc11.equals(d22) && !disc22.equals(d22) && !disc33.equals(d22) && !disc44.equals(d22)){
       disc5_prof.setText(d22);
       }else if("".equals(disc55) &&  !"".equals(disc11) && !"".equals(disc22) && !"".equals(disc33) && !"".equals(d23) && !asd.equals(d23) && !asd2.equals(d23) && !asd3.equals(d23) && !asd4.equals(d23) && !disc11.equals(d23) && !disc22.equals(d23) && !disc33.equals(d23) && !disc44.equals(d23)){
       disc5_prof.setText(d23);
       }else if("".equals(disc55) &&  !"".equals(disc11) && !"".equals(disc22) && !"".equals(disc33) && !"".equals(d24) && !asd.equals(d24) && !asd2.equals(d24) && !asd3.equals(d24) && !asd4.equals(d24) && !disc11.equals(d24) && !disc22.equals(d24) && !disc33.equals(d24) && !disc44.equals(d24)){
       disc5_prof.setText(d24);
       }else if("".equals(disc55) &&  !"".equals(disc11) && !"".equals(disc22) && !"".equals(disc33) && !"".equals(d25) && !asd.equals(d25) && !asd2.equals(d25) && !asd3.equals(d25) && !asd4.equals(d25) && !disc11.equals(d25) && !disc22.equals(d25) && !disc33.equals(d25) && !disc44.equals(d25)){
       disc5_prof.setText(d25);
       }else if("".equals(disc55) &&  !"".equals(disc11) && !"".equals(disc22) && !"".equals(disc33) && !"".equals(d26) && !asd.equals(d26) && !asd2.equals(d26) && !asd3.equals(d26) && !asd4.equals(d26) && !disc11.equals(d26) && !disc22.equals(d26) && !disc33.equals(d26) && !disc44.equals(d26)){
       disc5_prof.setText(d26);
       }
        
        
         else if("".equals(d1) && a==1 && disc55.equals(Porenquanto.getM1ant())){
           disc5_prof.setText("");
}else if("".equals(d2) && b==1 && disc55.equals(Porenquanto.getM2ant())){
           disc5_prof.setText("");    
}else if("".equals(d3) && c==1 && disc55.equals(Porenquanto.getM3ant())){
           disc5_prof.setText("");    
}else if("".equals(d4) && d==1 && disc55.equals(Porenquanto.getM4ant())){
           disc5_prof.setText("");    
}else if("".equals(d5) && e==1 && disc55.equals(Porenquanto.getM5ant())){
           disc5_prof.setText("");    
}else if("".equals(d6) && f==1 && disc55.equals(Porenquanto.getM6ant())){
           disc5_prof.setText("");    
}else if("".equals(d7) && g==1 && disc55.equals(Porenquanto.getM7ant())){
           disc5_prof.setText("");   
}else if("".equals(d8) && h==1 && disc55.equals(Porenquanto.getM8ant())){
           disc5_prof.setText("");    
}else if("".equals(d9) && i==1 && disc55.equals(Porenquanto.getM9ant())){
           disc5_prof.setText("");    
}else if("".equals(d10) && j==1 && disc55.equals(Porenquanto.getM10ant())){
           disc5_prof.setText("");    
}else if("".equals(d11) && k==1 && disc55.equals(Porenquanto.getM11ant())){
           disc5_prof.setText("");    
}else if("".equals(d12) && l==1 && disc55.equals(Porenquanto.getM12ant())){
           disc5_prof.setText("");    
}else if("".equals(d13) && m==1 && disc55.equals(Porenquanto.getM13ant())){
           disc5_prof.setText("");    
}else if("".equals(d14) && n==1 && disc55.equals(Porenquanto.getM14ant())){
           disc5_prof.setText("");    
}else if("".equals(d15) && o==1 && disc55.equals(Porenquanto.getM15ant())){
           disc5_prof.setText("");    
}else if("".equals(d16) && p==1 && disc55.equals(Porenquanto.getM16ant())){
           disc5_prof.setText("");    
}else if("".equals(d17) && q==1 && disc55.equals(Porenquanto.getM17ant())){
           disc5_prof.setText("");    
}else if("".equals(d17) && r==1 && disc55.equals(Porenquanto.getM18ant())){
           disc5_prof.setText("");    
}else if("".equals(d19) && s==1 && disc55.equals(Porenquanto.getM19ant())){
           disc5_prof.setText("");    
}else if("".equals(d20) && t==1 && disc55.equals(Porenquanto.getM20ant())){
           disc5_prof.setText("");    
}else if("".equals(d21) && u==1 && disc55.equals(Porenquanto.getM21ant())){
           disc5_prof.setText("");    
}else if("".equals(d22) && v==1 && disc55.equals(Porenquanto.getM22ant())){
           disc5_prof.setText("");    
}else if("".equals(d23) && w==1 && disc55.equals(Porenquanto.getM23ant())){
           disc5_prof.setText("");    
}else if("".equals(d24) && x==1 && disc55.equals(Porenquanto.getM24ant())){
           disc5_prof.setText("");   
}else if("".equals(d25) && y==1 && disc55.equals(Porenquanto.getM25ant())){
           disc5_prof.setText("");    
}else if("".equals(d26) && z==1 && disc55.equals(Porenquanto.getM26ant())){
           disc5_prof.setText("");    
}
    }
    
    private void VerificaSerieTurma () {
        try {
           listaS=seriemet.Buscar("%");
        } catch (SQLException ex) {
            Logger.getLogger(Menu3.class.getName()).log(Level.SEVERE, null, ex);
        }
        
    for(int ind=0;listaS.size()>ind;ind++){
        serie=listaS.get(ind);
        if( "1".equals(serie.getNome())){
            serie1_prof.setVisible(true);
            serie1_prof.setText("1");
        }
        if("2".equals(serie.getNome())){
             serie2_prof.setVisible(true);
             serie2_prof.setText("2");
        }
        if("3".equals(serie.getNome())){
             serie3_prof.setVisible(true);
             serie3_prof.setText("3");
        }
        if("1".equals(serie.getNome()) && "A".equals(serie.getTurma())){
            serieA1.setVisible(true);
            serieA1.setText("A");
            JLA1.setVisible(true);
            JLA1.setText("X");
           JLA1.setForeground(Color.BLACK);
        }
        if("2".equals(serie.getNome()) && "A".equals(serie.getTurma())){
             serieA2.setVisible(true);
            serieA2.setText("A");
            JLA2.setVisible(true);
            JLA2.setText("X");
            JLA2.setForeground(Color.BLACK);
        }
        if("3".equals(serie.getNome()) && "A".equals(serie.getTurma())){
            serieA3.setVisible(true);
            serieA3.setText("A");
            JLA3.setVisible(true);
            JLA3.setText("X");
            JLA3.setForeground(Color.BLACK);
        }
        if("1".equals(serie.getNome()) && "B".equals(serie.getTurma())){
            serieB1.setVisible(true);
            serieB1.setText("B");
            JLB1.setVisible(true);
            JLB1.setText("X");
            JLB1.setForeground(Color.BLACK);
        }
        if("2".equals(serie.getNome()) && "B".equals(serie.getTurma())){
            serieB2.setVisible(true);
            serieB2.setText("B");
            JLB2.setVisible(true);
            JLB2.setText("X");
            JLB2.setForeground(Color.BLACK);
        }
        if("3".equals(serie.getNome()) && "B".equals(serie.getTurma())){
            serieB3.setVisible(true);
            serieB3.setText("B");
            JLB3.setVisible(true);
            JLB3.setText("X");
            JLB3.setForeground(Color.BLACK);
        }
        if("1".equals(serie.getNome()) && "C".equals(serie.getTurma())){
            serieC1.setVisible(true);
            serieC1.setText("C");
            JLC1.setVisible(true);
            JLC1.setText("X");
            JLC1.setForeground(Color.BLACK);
        }
        if("2".equals(serie.getNome()) && "C".equals(serie.getTurma())){
            serieC2.setVisible(true);
            serieC2.setText("C");
             JLC2.setVisible(true);
            JLC2.setText("X");
            JLC2.setForeground(Color.BLACK);
        }
        if("3".equals(serie.getNome()) && "C".equals(serie.getTurma())){
            serieC3.setVisible(true);
            serieC3.setText("C");
            JLC3.setVisible(true);
            JLC3.setText("X");
            JLC3.setForeground(Color.BLACK);
        }
        if("1".equals(serie.getNome()) && "D".equals(serie.getTurma())){
            serieD1.setVisible(true);
            serieD1.setText("D");
            JLD1.setVisible(true);
            JLD1.setText("X");
            JLD1.setForeground(Color.BLACK);
        }
        if("2".equals(serie.getNome()) && "D".equals(serie.getTurma())){
            serieD2.setVisible(true);
            serieD2.setText("D");
            JLD2.setVisible(true);
            JLD2.setText("X");
            JLD2.setForeground(Color.BLACK);
        }
        if("3".equals(serie.getNome()) && "D".equals(serie.getTurma())){
            serieD3.setVisible(true);
            serieD3.setText("D");
            JLD3.setVisible(true);
            JLD3.setText("X");
            JLD3.setForeground(Color.BLACK);
        }
        if("1".equals(serie.getNome()) && "E".equals(serie.getTurma())){
            serieE1.setVisible(true);
            serieE1.setText("E");
            JLE1.setVisible(true);
            JLE1.setText("X");
            JLE1.setForeground(Color.BLACK);
        }
        if("2".equals(serie.getNome()) && "E".equals(serie.getTurma())){
            serieE2.setVisible(true);
            serieE2.setText("E");
            JLE2.setVisible(true);
            JLE2.setText("X");
            JLE2.setForeground(Color.BLACK);
        }
        if("3".equals(serie.getNome()) && "E".equals(serie.getTurma())){
            serieE3.setVisible(true);
            serieE3.setText("E");
            JLE3.setVisible(true);
            JLE3.setText("X");
            JLE3.setForeground(Color.BLACK);
        }
        if("1".equals(serie.getNome()) && "F".equals(serie.getTurma())){
            serieF1.setVisible(true);
            serieF1.setText("F");
            JLF1.setVisible(true);
            JLF1.setText("X");
            JLF1.setForeground(Color.BLACK);
        }
        if("2".equals(serie.getNome()) && "F".equals(serie.getTurma())){
            serieF2.setVisible(true);
            serieF2.setText("F");
            JLF2.setVisible(true);
            JLF2.setText("X");
            JLF2.setForeground(Color.BLACK);
        }
        if("3".equals(serie.getNome()) && "F".equals(serie.getTurma())){
            serieF3.setVisible(true);
            serieF3.setText("F");
            JLF3.setVisible(true);
            JLF3.setText("X");
            JLF3.setForeground(Color.BLACK);
        }
        if("1".equals(serie.getNome()) && "G".equals(serie.getTurma())){
            serieG1.setVisible(true);
            serieG1.setText("G");
            JLG1.setVisible(true);
            JLG1.setText("X");
            JLG1.setForeground(Color.BLACK);
        }
        if("2".equals(serie.getNome()) && "G".equals(serie.getTurma())){
            serieG2.setVisible(true);
            serieG2.setText("G");
            JLG2.setVisible(true);
            JLG2.setText("X");
            JLG2.setForeground(Color.BLACK);
        }
        if("3".equals(serie.getNome()) && "G".equals(serie.getTurma())){
            serieG3.setVisible(true);
            serieG3.setText("G");
            JLG3.setVisible(true);
            JLG3.setText("X");
            JLG3.setForeground(Color.BLACK);
        }
        if("1".equals(serie.getNome()) && "H".equals(serie.getTurma())){
            serieH1.setVisible(true);
            serieH1.setText("H");
            JLH1.setVisible(true);
            JLH1.setText("X");
            JLH1.setForeground(Color.BLACK);
        }
        if("2".equals(serie.getNome()) && "H".equals(serie.getTurma())){
            serieH2.setVisible(true);
            serieH2.setText("H");
            JLH2.setVisible(true);
            JLH2.setText("X");
            JLH2.setForeground(Color.BLACK);
        }
        if("3".equals(serie.getNome()) && "H".equals(serie.getTurma())){
            serieH3.setVisible(true);
            serieH3.setText("H");
            JLH3.setVisible(true);
            JLH3.setText("X");
            JLH3.setForeground(Color.BLACK);
        }
        
    }    
        
          }

  public int getId_curso() {
        return id;
    }

    public void setId_curso(int id) {
        Menu3.id = id;
    }
    
    public void executaALTDEL(){
     jDialog1.setVisible(false);
escolha=jRB_edt_del_prof.getText();
ChamaEscolha(escolha);
             
       
    }
    
   private  void JTTabelaLinhaSelecionada_prof(JTable tabela)  {
            
        if (jTTabela_Prof_prof.getSelectedRow() > -1) {
             id_deste=Prof.get(tabela.getSelectedRow()).getId(); 
            setId_curso(id_deste);                 
           executaALTDEL();
           jTF_nome_prof.setText(Prof.get(tabela.getSelectedRow()).getNome());
           jTF_Carga_horaria_prof.setText(String.valueOf(Prof.get(tabela.getSelectedRow()).getCarga_horaria()));
           VerificaSerieTurma();
           SerieTurma(id_deste);
           BuscaMaterias(id_deste);
            BuscarDias(id_deste);
            jTTabela_Prof_prof.clearSelection();
            
        } else {
          
        }
        
         
  }

    private void listarProfessor() {
        try {
            Prof = profmet.BuscarNome(JTF_Pesquisar_prof.getText() + "%");
        } catch (SQLException ex) {
            Logger.getLogger(Menu3.class.getName()).log(Level.SEVERE, null, ex);
        }
        mostraPesquisa(Prof);
    }

    private void mostraPesquisa(List<Professor> Prof) {
          while (tmProf_prof.getRowCount() > 0) {
            tmProf_prof.removeRow(0);
        }
        if (Prof.isEmpty()) {
            
        } else {
            String[] linhaa = new String[]{null};
            for (int ind = 0; ind < Prof.size(); ind++) {
                tmProf_prof.addRow(linhaa);
                tmProf_prof.setValueAt(Prof.get(ind).getNome(), ind, 0);
            }
        }
    }

    private boolean VerificaseaIgual() {
        int esc=0;
        try {
            listaP=profmet.BuscarNome("%");
        } catch (SQLException ex) {
            Logger.getLogger(Menu3.class.getName()).log(Level.SEVERE, null, ex);
        }
        for(int ind=0;listaP.size()>ind;ind++){
            professor= listaP.get(ind);
            if(professor.getNome().equals(jTF_nome_prof.getText())){
               esc=1;
            }
        }
        if(esc==1){
             return false;
        }else{
            return true;
        }
    }

    private boolean VerificaDadosCorretos () {
         if( "".equals(jTF_nome_prof.getText()) || "".equals(jTF_Carga_horaria_prof.getText()) || "X".equals(JLA1.getText()) && "X".equals(JLA2.getText()) && "X".equals(JLA3.getText()) && 
                 "X".equals(JLB1.getText()) && "X".equals(JLB2.getText()) && "X".equals(JLB3.getText()) && "X".equals(JLC1.getText()) && "X".equals(JLC2.getText()) && "X".equals(JLC3.getText()) &&
                 "X".equals(JLD1.getText()) && "X".equals(JLD2.getText()) && "X".equals(JLD3.getText()) && "X".equals(JLE1.getText()) && "X".equals(JLE2.getText()) && "X".equals(JLE3.getText()) &&
                 "X".equals(JLF1.getText()) && "X".equals(JLF2.getText()) && "X".equals(JLF3.getText()) && "X".equals(JLG1.getText()) && "X".equals(JLG2.getText()) && "X".equals(JLG3.getText()) &&
                 "X".equals(JLH1.getText()) && "X".equals(JLH2.getText()) && "X".equals(JLH3.getText()) || "".equals(disc1_prof.getText()) && "".equals(disc2_prof.getText()) && "".equals(disc3_prof.getText()) && "".equals(disc4_prof.getText() ) && "".equals(disc5_prof.getText() )
                 || jTable2.getModel().getValueAt(0,0)=="" && jTable2.getModel().getValueAt(1,0)=="" && jTable2.getModel().getValueAt(2,0)==""  && jTable2.getModel().getValueAt(3,0)==""  && jTable2.getModel().getValueAt(4,0)=="" && jTable2.getModel().getValueAt(5,0)=="" && jTable2.getModel().getValueAt(6,0)=="" && jTable2.getModel().getValueAt(7,0)=="" && jTable2.getModel().getValueAt(8,0)==""  &&
                 jTable2.getModel().getValueAt(0,1)=="" && jTable2.getModel().getValueAt(1,1)=="" && jTable2.getModel().getValueAt(2,1)==""  && jTable2.getModel().getValueAt(3,1)==""  && jTable2.getModel().getValueAt(4,1)=="" && jTable2.getModel().getValueAt(5,1)=="" && jTable2.getModel().getValueAt(6,1)=="" && jTable2.getModel().getValueAt(7,1)=="" && jTable2.getModel().getValueAt(8,1)==""  && 
                 jTable2.getModel().getValueAt(0,2)=="" && jTable2.getModel().getValueAt(1,2)=="" && jTable2.getModel().getValueAt(2,2)==""  && jTable2.getModel().getValueAt(3,2)==""  && jTable2.getModel().getValueAt(4,2)=="" && jTable2.getModel().getValueAt(5,2)=="" && jTable2.getModel().getValueAt(6,2)=="" && jTable2.getModel().getValueAt(7,2)=="" && jTable2.getModel().getValueAt(8,2)==""  &&
                 jTable2.getModel().getValueAt(0,3)=="" && jTable2.getModel().getValueAt(1,3)=="" && jTable2.getModel().getValueAt(2,3)==""  && jTable2.getModel().getValueAt(3,3)==""  && jTable2.getModel().getValueAt(4,3)=="" && jTable2.getModel().getValueAt(5,3)=="" && jTable2.getModel().getValueAt(6,3)=="" && jTable2.getModel().getValueAt(7,3)=="" && jTable2.getModel().getValueAt(8,3)==""  &&
                 jTable2.getModel().getValueAt(0,4)=="" && jTable2.getModel().getValueAt(1,4)=="" && jTable2.getModel().getValueAt(2,4)==""  && jTable2.getModel().getValueAt(3,4)==""  && jTable2.getModel().getValueAt(4,4)=="" && jTable2.getModel().getValueAt(5,4)=="" && jTable2.getModel().getValueAt(6,4)=="" && jTable2.getModel().getValueAt(7,4)=="" && jTable2.getModel().getValueAt(8,4)=="" ) {
            return false;
        }else {
            return true;
        }
    }
    
    private boolean VerificaDadosCorretosALTDEL() {
         if( "".equals(jTF_nome_prof.getText()) || "".equals(jTF_Carga_horaria_prof.getText()) || "X".equals(JLA1.getText()) && "X".equals(JLA2.getText()) && "X".equals(JLA3.getText()) && 
                 "X".equals(JLB1.getText()) && "X".equals(JLB2.getText()) && "X".equals(JLB3.getText()) && "X".equals(JLC1.getText()) && "X".equals(JLC2.getText()) && "X".equals(JLC3.getText()) &&
                 "X".equals(JLD1.getText()) && "X".equals(JLD2.getText()) && "X".equals(JLD3.getText()) && "X".equals(JLE1.getText()) && "X".equals(JLE2.getText()) && "X".equals(JLE3.getText()) &&
                 "X".equals(JLF1.getText()) && "X".equals(JLF2.getText()) && "X".equals(JLF3.getText()) && "X".equals(JLG1.getText()) && "X".equals(JLG2.getText()) && "X".equals(JLG3.getText()) &&
                 "X".equals(JLH1.getText()) && "X".equals(JLH2.getText()) && "X".equals(JLH3.getText()) || "Clique aqui para adicionar uma disciplina".equals(disc1_prof.getText()) && "Clique aqui para adicionar uma disciplina".equals(disc2_prof.getText()) && "Clique aqui para adicionar uma disciplina".equals(disc3_prof.getText()) && "Clique aqui para adicionar uma disciplina".equals(disc4_prof.getText())
                 || jTable2.getModel().getValueAt(0,0)=="" && jTable2.getModel().getValueAt(1,0)=="" && jTable2.getModel().getValueAt(2,0)==""  && jTable2.getModel().getValueAt(3,0)==""  && jTable2.getModel().getValueAt(4,0)=="" && jTable2.getModel().getValueAt(5,0)=="" && jTable2.getModel().getValueAt(6,0)=="" && jTable2.getModel().getValueAt(7,0)=="" && jTable2.getModel().getValueAt(8,0)=="" &&
                 jTable2.getModel().getValueAt(0,1)=="" && jTable2.getModel().getValueAt(1,1)=="" && jTable2.getModel().getValueAt(2,1)==""  && jTable2.getModel().getValueAt(3,1)==""  && jTable2.getModel().getValueAt(4,1)=="" && jTable2.getModel().getValueAt(5,1)=="" && jTable2.getModel().getValueAt(6,1)=="" && jTable2.getModel().getValueAt(7,1)=="" && jTable2.getModel().getValueAt(8,1)==""  && 
                 jTable2.getModel().getValueAt(0,2)=="" && jTable2.getModel().getValueAt(1,2)=="" && jTable2.getModel().getValueAt(2,2)==""  && jTable2.getModel().getValueAt(3,2)==""  && jTable2.getModel().getValueAt(4,2)=="" && jTable2.getModel().getValueAt(5,2)=="" && jTable2.getModel().getValueAt(6,2)=="" && jTable2.getModel().getValueAt(7,2)=="" && jTable2.getModel().getValueAt(8,2)==""  &&
                 jTable2.getModel().getValueAt(0,3)=="" && jTable2.getModel().getValueAt(1,3)=="" && jTable2.getModel().getValueAt(2,3)==""  && jTable2.getModel().getValueAt(3,3)==""  && jTable2.getModel().getValueAt(4,3)=="" && jTable2.getModel().getValueAt(5,3)=="" && jTable2.getModel().getValueAt(6,3)=="" && jTable2.getModel().getValueAt(7,3)=="" && jTable2.getModel().getValueAt(8,3)==""  &&
                 jTable2.getModel().getValueAt(0,4)=="" && jTable2.getModel().getValueAt(1,4)=="" && jTable2.getModel().getValueAt(2,4)==""  && jTable2.getModel().getValueAt(3,4)==""  && jTable2.getModel().getValueAt(4,4)=="" && jTable2.getModel().getValueAt(5,4)=="" && jTable2.getModel().getValueAt(6,4)=="" && jTable2.getModel().getValueAt(7,4)=="" && jTable2.getModel().getValueAt(8,4)=="" ) {
            return false;
        }else {
            return true;
        }
    }

    private void CadatrarProfessor () {
        professor.setNome(jTF_nome_prof.getText());
        professor.setCarga_horaria(Integer.parseInt(jTF_Carga_horaria_prof.getText()));
        profmet.Adiciona(professor);
        int id_prof=profmet.BuscaId(professor);
        if(!"".equals(disc1_prof.getText()) && !"Clique aqui para adicionar uma disciplina".equals(disc1_prof.getText())){
            try {
                listaD=discmet.BuscarDisciplinas(disc1_prof.getText());
            } catch (SQLException ex) {
                Logger.getLogger(Menu3.class.getName()).log(Level.SEVERE, null, ex);
            }
            disciplina=listaD.get(0);
            profdiscmet.Adiciona(id_prof,disciplina);
        }
        if(!"".equals(disc2_prof.getText()) && !"Clique aqui para adicionar uma disciplina".equals(disc2_prof.getText())){
            try {
                listaD=discmet.BuscarDisciplinas(disc2_prof.getText());
            } catch (SQLException ex) {
                Logger.getLogger(Menu3.class.getName()).log(Level.SEVERE, null, ex);
            }
            disciplina=listaD.get(0);
            profdiscmet.Adiciona(id_prof,disciplina);
        }
        if(!"".equals(disc3_prof.getText()) && !"Clique aqui para adicionar uma disciplina".equals(disc3_prof.getText())){
            try {
                listaD=discmet.BuscarDisciplinas(disc3_prof.getText());
            } catch (SQLException ex) {
                Logger.getLogger(Menu3.class.getName()).log(Level.SEVERE, null, ex);
            }
            disciplina=listaD.get(0);
            profdiscmet.Adiciona(id_prof,disciplina);
        }
        if(!"".equals(disc4_prof.getText()) && !"Clique aqui para adicionar uma disciplina".equals(disc4_prof.getText())){
            try {
                listaD=discmet.BuscarDisciplinas(disc4_prof.getText());
            } catch (SQLException ex) {
                Logger.getLogger(Menu3.class.getName()).log(Level.SEVERE, null, ex);
            }
            disciplina=listaD.get(0);
            profdiscmet.Adiciona(id_prof,disciplina);
        }
        if(!"".equals(disc5_prof.getText()) && !"Clique aqui para adicionar uma disciplina".equals(disc5_prof.getText())){
            try {
                listaD=discmet.BuscarDisciplinas(disc5_prof.getText());
            } catch (SQLException ex) {
                Logger.getLogger(Menu3.class.getName()).log(Level.SEVERE, null, ex);
            }
            disciplina=listaD.get(0);
            profdiscmet.Adiciona(id_prof,disciplina);
        }
        if("V".equals(JLA1.getText())){
            try {
                serie=seriemet.BuscarSeriePorAnoeTurma("1","A");
            } catch (SQLException ex) {
                Logger.getLogger(Menu3.class.getName()).log(Level.SEVERE, null, ex);
            }
            System.out.println(""+serie.getId());
            profserieturmamet.AdicionaProfSerie(id_prof,serie);    
        }
        if("V".equals(JLA2.getText())){
            try {
                serie=seriemet.BuscarSeriePorAnoeTurma("2","A");
            } catch (SQLException ex) {
                Logger.getLogger(Menu3.class.getName()).log(Level.SEVERE, null, ex);
            }
            System.out.println(""+serie.getId());
            profserieturmamet.AdicionaProfSerie(id_prof,serie);    
        }
        if("V".equals(JLA3.getText())){
            try {
                serie=seriemet.BuscarSeriePorAnoeTurma("3","A");
            } catch (SQLException ex) {
                Logger.getLogger(Menu3.class.getName()).log(Level.SEVERE, null, ex);
            }
            System.out.println(""+serie.getId());
            profserieturmamet.AdicionaProfSerie(id_prof,serie);    
        }
        if("V".equals(JLB1.getText())){
            try {
                serie=seriemet.BuscarSeriePorAnoeTurma("1","B");
            } catch (SQLException ex) {
                Logger.getLogger(Menu3.class.getName()).log(Level.SEVERE, null, ex);
            }
            System.out.println(""+serie.getId());
            profserieturmamet.AdicionaProfSerie(id_prof,serie);    
        }
        if("V".equals(JLB2.getText())){
            try {
                serie=seriemet.BuscarSeriePorAnoeTurma("2","B");
            } catch (SQLException ex) {
                Logger.getLogger(Menu3.class.getName()).log(Level.SEVERE, null, ex);
            }
            System.out.println(""+serie.getId());
            profserieturmamet.AdicionaProfSerie(id_prof,serie);    
        }
        if("V".equals(JLB3.getText())){
            try {
                serie=seriemet.BuscarSeriePorAnoeTurma("3","B");
            } catch (SQLException ex) {
                Logger.getLogger(Menu3.class.getName()).log(Level.SEVERE, null, ex);
            }
            System.out.println(""+serie.getId());
            profserieturmamet.AdicionaProfSerie(id_prof,serie);    
        }
        if("V".equals(JLC1.getText())){
            try {
                serie=seriemet.BuscarSeriePorAnoeTurma("1","C");
            } catch (SQLException ex) {
                Logger.getLogger(Menu3.class.getName()).log(Level.SEVERE, null, ex);
            }
            System.out.println(""+serie.getId());
            profserieturmamet.AdicionaProfSerie(id_prof,serie);    
        }
        if("V".equals(JLC2.getText())){
            try {
                serie=seriemet.BuscarSeriePorAnoeTurma("2","C");
            } catch (SQLException ex) {
                Logger.getLogger(Menu3.class.getName()).log(Level.SEVERE, null, ex);
            }
            System.out.println(""+serie.getId());
            profserieturmamet.AdicionaProfSerie(id_prof,serie);    
        }
        if("V".equals(JLC3.getText())){
            try {
                serie=seriemet.BuscarSeriePorAnoeTurma("3","C");
            } catch (SQLException ex) {
                Logger.getLogger(Menu3.class.getName()).log(Level.SEVERE, null, ex);
            }
            System.out.println(""+serie.getId());
            profserieturmamet.AdicionaProfSerie(id_prof,serie);    
        }
        if("V".equals(JLD1.getText())){
            try {
                serie=seriemet.BuscarSeriePorAnoeTurma("1","D");
            } catch (SQLException ex) {
                Logger.getLogger(Menu3.class.getName()).log(Level.SEVERE, null, ex);
            }
            System.out.println(""+serie.getId());
            profserieturmamet.AdicionaProfSerie(id_prof,serie);    
        }
        if("V".equals(JLD2.getText())){
            try {
                serie=seriemet.BuscarSeriePorAnoeTurma("2","D");
            } catch (SQLException ex) {
                Logger.getLogger(Menu3.class.getName()).log(Level.SEVERE, null, ex);
            }
            profserieturmamet.AdicionaProfSerie(id_prof,serie);    
        }
        if("V".equals(JLD3.getText())){
            try {
                serie=seriemet.BuscarSeriePorAnoeTurma("3","D");
            } catch (SQLException ex) {
                Logger.getLogger(Menu3.class.getName()).log(Level.SEVERE, null, ex);
            }
            profserieturmamet.AdicionaProfSerie(id_prof,serie);    
        }
        if("V".equals(JLE1.getText())){
            try {
                serie=seriemet.BuscarSeriePorAnoeTurma("1","E");
            } catch (SQLException ex) {
                Logger.getLogger(Menu3.class.getName()).log(Level.SEVERE, null, ex);
            }
            profserieturmamet.AdicionaProfSerie(id_prof,serie);    
        }
        if("V".equals(JLE2.getText())){
            try {
                serie=seriemet.BuscarSeriePorAnoeTurma("2","E");
            } catch (SQLException ex) {
                Logger.getLogger(Menu3.class.getName()).log(Level.SEVERE, null, ex);
            }
            profserieturmamet.AdicionaProfSerie(id_prof,serie);    
        }
        if("V".equals(JLE3.getText())){
            try {
                serie=seriemet.BuscarSeriePorAnoeTurma("3","E");
            } catch (SQLException ex) {
                Logger.getLogger(Menu3.class.getName()).log(Level.SEVERE, null, ex);
            }
            profserieturmamet.AdicionaProfSerie(id_prof,serie);    
        }
        if("V".equals(JLF1.getText())){
            try {
                serie=seriemet.BuscarSeriePorAnoeTurma("1","F");
            } catch (SQLException ex) {
                Logger.getLogger(Menu3.class.getName()).log(Level.SEVERE, null, ex);
            }
            profserieturmamet.AdicionaProfSerie(id_prof,serie);    
        }
        if("V".equals(JLF2.getText())){
            try {
                serie=seriemet.BuscarSeriePorAnoeTurma("2","F");
            } catch (SQLException ex) {
                Logger.getLogger(Menu3.class.getName()).log(Level.SEVERE, null, ex);
            }
            profserieturmamet.AdicionaProfSerie(id_prof,serie);    
        }
        if("V".equals(JLF3.getText())){
            try {
                serie=seriemet.BuscarSeriePorAnoeTurma("3","F");
            } catch (SQLException ex) {
                Logger.getLogger(Menu3.class.getName()).log(Level.SEVERE, null, ex);
            }
            profserieturmamet.AdicionaProfSerie(id_prof,serie);    
        }
        if("V".equals(JLG1.getText())){
            try {
                serie=seriemet.BuscarSeriePorAnoeTurma("1","G");
            } catch (SQLException ex) {
                Logger.getLogger(Menu3.class.getName()).log(Level.SEVERE, null, ex);
            }
            profserieturmamet.AdicionaProfSerie(id_prof,serie);    
        }
        if("V".equals(JLG2.getText())){
            try {
                serie=seriemet.BuscarSeriePorAnoeTurma("2","G");
            } catch (SQLException ex) {
                Logger.getLogger(Menu3.class.getName()).log(Level.SEVERE, null, ex);
            }
            profserieturmamet.AdicionaProfSerie(id_prof,serie);    
        }
        if("V".equals(JLG3.getText())){
            try {
                serie=seriemet.BuscarSeriePorAnoeTurma("3","G");
            } catch (SQLException ex) {
                Logger.getLogger(Menu3.class.getName()).log(Level.SEVERE, null, ex);
            }
            profserieturmamet.AdicionaProfSerie(id_prof,serie);    
        }
        if("V".equals(JLH1.getText())){
            try {
                serie=seriemet.BuscarSeriePorAnoeTurma("1","H");
            } catch (SQLException ex) {
                Logger.getLogger(Menu3.class.getName()).log(Level.SEVERE, null, ex);
            }
            profserieturmamet.AdicionaProfSerie(id_prof,serie);    
        }if("V".equals(JLH2.getText())){
            try {
                serie=seriemet.BuscarSeriePorAnoeTurma("2","H");
            } catch (SQLException ex) {
                Logger.getLogger(Menu3.class.getName()).log(Level.SEVERE, null, ex);
            }
            profserieturmamet.AdicionaProfSerie(id_prof,serie);    
        }
        if("V".equals(JLH3.getText())){
            try {
                serie=seriemet.BuscarSeriePorAnoeTurma("3","H");
            } catch (SQLException ex) {
                Logger.getLogger(Menu3.class.getName()).log(Level.SEVERE, null, ex);
            }
            profserieturmamet.AdicionaProfSerie(id_prof,serie);    
        }
        
        
        
        
        
        if(jTable2.getModel().getValueAt(0,0)!=""){
           profdias.setId_dias(1); 
           profdias.setId_aula(1);
           profdias.setId_prof(id_prof);
            try {
                profdiasmet.Adicionar(profdias);
            } catch (SQLException ex) {
                Logger.getLogger(Menu3.class.getName()).log(Level.SEVERE, null, ex);
            }
        }
        if(jTable2.getModel().getValueAt(1,0)!=""){
           profdias.setId_dias(1); 
           profdias.setId_aula(2);
           profdias.setId_prof(id_prof);
            try {
                profdiasmet.Adicionar(profdias);
            } catch (SQLException ex) {
                Logger.getLogger(Menu3.class.getName()).log(Level.SEVERE, null, ex);
            }
        }
        if(jTable2.getModel().getValueAt(2,0)!=""){
           profdias.setId_dias(1); 
           profdias.setId_aula(3);
           profdias.setId_prof(id_prof);
            try {
                profdiasmet.Adicionar(profdias);
            } catch (SQLException ex) {
                Logger.getLogger(Menu3.class.getName()).log(Level.SEVERE, null, ex);
            }
        }
        if(jTable2.getModel().getValueAt(3,0)!=""){
           profdias.setId_dias(1); 
           profdias.setId_aula(4);
           profdias.setId_prof(id_prof);
            try {
                profdiasmet.Adicionar(profdias);
            } catch (SQLException ex) {
                Logger.getLogger(Menu3.class.getName()).log(Level.SEVERE, null, ex);
            }
        }
        if(jTable2.getModel().getValueAt(4,0)!=""){
           profdias.setId_dias(1); 
           profdias.setId_aula(5);
           profdias.setId_prof(id_prof);
            try {
                profdiasmet.Adicionar(profdias);
            } catch (SQLException ex) {
                Logger.getLogger(Menu3.class.getName()).log(Level.SEVERE, null, ex);
            }
        }
        
        if(jTable2.getModel().getValueAt(5,0)!=""){
           profdias.setId_dias(1); 
           profdias.setId_aula(6);
           profdias.setId_prof(id_prof);
            try {
                profdiasmet.Adicionar(profdias);
            } catch (SQLException ex) {
                Logger.getLogger(Menu3.class.getName()).log(Level.SEVERE, null, ex);
            }
        }
        
        if(jTable2.getModel().getValueAt(6,0)!=""){
           profdias.setId_dias(1); 
           profdias.setId_aula(7);
           profdias.setId_prof(id_prof);
            try {
                profdiasmet.Adicionar(profdias);
            } catch (SQLException ex) {
                Logger.getLogger(Menu3.class.getName()).log(Level.SEVERE, null, ex);
            }
        }
        if(jTable2.getModel().getValueAt(7,0)!=""){
           profdias.setId_dias(1); 
           profdias.setId_aula(8);
           profdias.setId_prof(id_prof);
            try {
                profdiasmet.Adicionar(profdias);
            } catch (SQLException ex) {
                Logger.getLogger(Menu3.class.getName()).log(Level.SEVERE, null, ex);
            }
        }
        if(jTable2.getModel().getValueAt(8,0)!=""){
           profdias.setId_dias(1); 
           profdias.setId_aula(9);
           profdias.setId_prof(id_prof);
            try {
                profdiasmet.Adicionar(profdias);
            } catch (SQLException ex) {
                Logger.getLogger(Menu3.class.getName()).log(Level.SEVERE, null, ex);
            }
        }
        
        
        if(jTable2.getModel().getValueAt(0,1)!=""){
           profdias.setId_dias(2); 
           profdias.setId_aula(1);
           profdias.setId_prof(id_prof);
            try {
                profdiasmet.Adicionar(profdias);
            } catch (SQLException ex) {
                Logger.getLogger(Menu3.class.getName()).log(Level.SEVERE, null, ex);
            }
        }
        if(jTable2.getModel().getValueAt(1,1)!=""){
           profdias.setId_dias(2); 
           profdias.setId_aula(2);
           profdias.setId_prof(id_prof);
            try {
                profdiasmet.Adicionar(profdias);
            } catch (SQLException ex) {
                Logger.getLogger(Menu3.class.getName()).log(Level.SEVERE, null, ex);
            }
        }
        if(jTable2.getModel().getValueAt(2,1)!=""){
           profdias.setId_dias(2); 
           profdias.setId_aula(3);
           profdias.setId_prof(id_prof);
            try {
                profdiasmet.Adicionar(profdias);
            } catch (SQLException ex) {
                Logger.getLogger(Menu3.class.getName()).log(Level.SEVERE, null, ex);
            }
        }
        if(jTable2.getModel().getValueAt(3,1)!=""){
           profdias.setId_dias(2); 
           profdias.setId_aula(4);
           profdias.setId_prof(id_prof);
            try {
                profdiasmet.Adicionar(profdias);
            } catch (SQLException ex) {
                Logger.getLogger(Menu3.class.getName()).log(Level.SEVERE, null, ex);
            }
        }
        if(jTable2.getModel().getValueAt(4,1)!=""){
           profdias.setId_dias(2); 
           profdias.setId_aula(5);
           profdias.setId_prof(id_prof);
            try {
                profdiasmet.Adicionar(profdias);
            } catch (SQLException ex) {
                Logger.getLogger(Menu3.class.getName()).log(Level.SEVERE, null, ex);
            }
        }
        if(jTable2.getModel().getValueAt(5,1)!=""){
           profdias.setId_dias(2); 
           profdias.setId_aula(6);
           profdias.setId_prof(id_prof);
            try {
                profdiasmet.Adicionar(profdias);
            } catch (SQLException ex) {
                Logger.getLogger(Menu3.class.getName()).log(Level.SEVERE, null, ex);
            }
        }
        if(jTable2.getModel().getValueAt(6,1)!=""){
           profdias.setId_dias(2); 
           profdias.setId_aula(7);
           profdias.setId_prof(id_prof);
            try {
                profdiasmet.Adicionar(profdias);
            } catch (SQLException ex) {
                Logger.getLogger(Menu3.class.getName()).log(Level.SEVERE, null, ex);
            }
        }
        if(jTable2.getModel().getValueAt(7,1)!=""){
           profdias.setId_dias(2); 
           profdias.setId_aula(8);
           profdias.setId_prof(id_prof);
            try {
                profdiasmet.Adicionar(profdias);
            } catch (SQLException ex) {
                Logger.getLogger(Menu3.class.getName()).log(Level.SEVERE, null, ex);
            }
        }
        if(jTable2.getModel().getValueAt(8,1)!=""){
           profdias.setId_dias(2); 
           profdias.setId_aula(9);
           profdias.setId_prof(id_prof);
            try {
                profdiasmet.Adicionar(profdias);
            } catch (SQLException ex) {
                Logger.getLogger(Menu3.class.getName()).log(Level.SEVERE, null, ex);
            }
        }
        
        
        if(jTable2.getModel().getValueAt(0,2)!=""){
           profdias.setId_dias(3); 
           profdias.setId_aula(1);
           profdias.setId_prof(id_prof);
            try {
                profdiasmet.Adicionar(profdias);
            } catch (SQLException ex) {
                Logger.getLogger(Menu3.class.getName()).log(Level.SEVERE, null, ex);
            }
        }
        if(jTable2.getModel().getValueAt(1,2)!=""){
           profdias.setId_dias(3); 
           profdias.setId_aula(2);
           profdias.setId_prof(id_prof);
            try {
                profdiasmet.Adicionar(profdias);
            } catch (SQLException ex) {
                Logger.getLogger(Menu3.class.getName()).log(Level.SEVERE, null, ex);
            }
        }
        if(jTable2.getModel().getValueAt(2,2)!=""){
           profdias.setId_dias(3); 
           profdias.setId_aula(3);
           profdias.setId_prof(id_prof);
            try {
                profdiasmet.Adicionar(profdias);
            } catch (SQLException ex) {
                Logger.getLogger(Menu3.class.getName()).log(Level.SEVERE, null, ex);
            }
        }
        if(jTable2.getModel().getValueAt(3,2)!=""){
           profdias.setId_dias(3); 
           profdias.setId_aula(4);
           profdias.setId_prof(id_prof);
            try {
                profdiasmet.Adicionar(profdias);
            } catch (SQLException ex) {
                Logger.getLogger(Menu3.class.getName()).log(Level.SEVERE, null, ex);
            }
        }
        if(jTable2.getModel().getValueAt(4,2)!=""){
           profdias.setId_dias(3); 
           profdias.setId_aula(5);
           profdias.setId_prof(id_prof);
            try {
                profdiasmet.Adicionar(profdias);
            } catch (SQLException ex) {
                Logger.getLogger(Menu3.class.getName()).log(Level.SEVERE, null, ex);
            }
        }
        if(jTable2.getModel().getValueAt(5,2)!=""){
           profdias.setId_dias(3); 
           profdias.setId_aula(6);
           profdias.setId_prof(id_prof);
            try {
                profdiasmet.Adicionar(profdias);
            } catch (SQLException ex) {
                Logger.getLogger(Menu3.class.getName()).log(Level.SEVERE, null, ex);
            }
        }
        if(jTable2.getModel().getValueAt(6,2)!=""){
           profdias.setId_dias(3); 
           profdias.setId_aula(7);
           profdias.setId_prof(id_prof);
            try {
                profdiasmet.Adicionar(profdias);
            } catch (SQLException ex) {
                Logger.getLogger(Menu3.class.getName()).log(Level.SEVERE, null, ex);
            }
        }
        if(jTable2.getModel().getValueAt(7,2)!=""){
           profdias.setId_dias(3); 
           profdias.setId_aula(8);
           profdias.setId_prof(id_prof);
            try {
                profdiasmet.Adicionar(profdias);
            } catch (SQLException ex) {
                Logger.getLogger(Menu3.class.getName()).log(Level.SEVERE, null, ex);
            }
        }
        if(jTable2.getModel().getValueAt(8,2)!=""){
           profdias.setId_dias(3); 
           profdias.setId_aula(9);
           profdias.setId_prof(id_prof);
            try {
                profdiasmet.Adicionar(profdias);
            } catch (SQLException ex) {
                Logger.getLogger(Menu3.class.getName()).log(Level.SEVERE, null, ex);
            }
        }
        
        
        if(jTable2.getModel().getValueAt(0,3)!=""){
           profdias.setId_dias(4); 
           profdias.setId_aula(1);
           profdias.setId_prof(id_prof);
            try {
                profdiasmet.Adicionar(profdias);
            } catch (SQLException ex) {
                Logger.getLogger(Menu3.class.getName()).log(Level.SEVERE, null, ex);
            }
        }
        if(jTable2.getModel().getValueAt(1,3)!=""){
           profdias.setId_dias(4); 
           profdias.setId_aula(2);
           profdias.setId_prof(id_prof);
            try {
                profdiasmet.Adicionar(profdias);
            } catch (SQLException ex) {
                Logger.getLogger(Menu3.class.getName()).log(Level.SEVERE, null, ex);
            }
        }
        if(jTable2.getModel().getValueAt(2,3)!=""){
           profdias.setId_dias(4); 
           profdias.setId_aula(3);
           profdias.setId_prof(id_prof);
            try {
                profdiasmet.Adicionar(profdias);
            } catch (SQLException ex) {
                Logger.getLogger(Menu3.class.getName()).log(Level.SEVERE, null, ex);
            }
        }
        if(jTable2.getModel().getValueAt(3,3)!=""){
           profdias.setId_dias(4); 
           profdias.setId_aula(4);
           profdias.setId_prof(id_prof);
            try {
                profdiasmet.Adicionar(profdias);
            } catch (SQLException ex) {
                Logger.getLogger(Menu3.class.getName()).log(Level.SEVERE, null, ex);
            }
        }
        if(jTable2.getModel().getValueAt(4,3)!=""){
           profdias.setId_dias(4); 
           profdias.setId_aula(5);
           profdias.setId_prof(id_prof);
            try {
                profdiasmet.Adicionar(profdias);
            } catch (SQLException ex) {
                Logger.getLogger(Menu3.class.getName()).log(Level.SEVERE, null, ex);
            }
        }
        if(jTable2.getModel().getValueAt(5,3)!=""){
           profdias.setId_dias(4); 
           profdias.setId_aula(6);
           profdias.setId_prof(id_prof);
            try {
                profdiasmet.Adicionar(profdias);
            } catch (SQLException ex) {
                Logger.getLogger(Menu3.class.getName()).log(Level.SEVERE, null, ex);
            }
        }
        if(jTable2.getModel().getValueAt(6,3)!=""){
           profdias.setId_dias(4); 
           profdias.setId_aula(7);
           profdias.setId_prof(id_prof);
            try {
                profdiasmet.Adicionar(profdias);
            } catch (SQLException ex) {
                Logger.getLogger(Menu3.class.getName()).log(Level.SEVERE, null, ex);
            }
        }
        if(jTable2.getModel().getValueAt(7,3)!=""){
           profdias.setId_dias(4); 
           profdias.setId_aula(8);
           profdias.setId_prof(id_prof);
            try {
                profdiasmet.Adicionar(profdias);
            } catch (SQLException ex) {
                Logger.getLogger(Menu3.class.getName()).log(Level.SEVERE, null, ex);
            }
        }
        if(jTable2.getModel().getValueAt(8,3)!=""){
           profdias.setId_dias(4); 
           profdias.setId_aula(9);
           profdias.setId_prof(id_prof);
            try {
                profdiasmet.Adicionar(profdias);
            } catch (SQLException ex) {
                Logger.getLogger(Menu3.class.getName()).log(Level.SEVERE, null, ex);
            }
        }
        
        
        if(jTable2.getModel().getValueAt(0,4)!=""){
           profdias.setId_dias(5); 
           profdias.setId_aula(1);
           profdias.setId_prof(id_prof);
            try {
                profdiasmet.Adicionar(profdias);
            } catch (SQLException ex) {
                Logger.getLogger(Menu3.class.getName()).log(Level.SEVERE, null, ex);
            }
        }
        if(jTable2.getModel().getValueAt(1,4)!=""){
           profdias.setId_dias(5); 
           profdias.setId_aula(2);
           profdias.setId_prof(id_prof);
            try {
                profdiasmet.Adicionar(profdias);
            } catch (SQLException ex) {
                Logger.getLogger(Menu3.class.getName()).log(Level.SEVERE, null, ex);
            }
        }
        if(jTable2.getModel().getValueAt(2,4)!=""){
           profdias.setId_dias(5); 
           profdias.setId_aula(3);
           profdias.setId_prof(id_prof);
            try {
                profdiasmet.Adicionar(profdias);
            } catch (SQLException ex) {
                Logger.getLogger(Menu3.class.getName()).log(Level.SEVERE, null, ex);
            }
        }
        if(jTable2.getModel().getValueAt(3,4)!=""){
           profdias.setId_dias(5); 
           profdias.setId_aula(4);
           profdias.setId_prof(id_prof);
            try {
                profdiasmet.Adicionar(profdias);
            } catch (SQLException ex) {
                Logger.getLogger(Menu3.class.getName()).log(Level.SEVERE, null, ex);
            }
        }
        if(jTable2.getModel().getValueAt(4,4)!=""){
           profdias.setId_dias(5); 
           profdias.setId_aula(5);
           profdias.setId_prof(id_prof);
            try {
                profdiasmet.Adicionar(profdias);
            } catch (SQLException ex) {
                Logger.getLogger(Menu3.class.getName()).log(Level.SEVERE, null, ex);
            }
        }
        if(jTable2.getModel().getValueAt(5,4)!=""){
           profdias.setId_dias(5); 
           profdias.setId_aula(6);
           profdias.setId_prof(id_prof);
            try {
                profdiasmet.Adicionar(profdias);
            } catch (SQLException ex) {
                Logger.getLogger(Menu3.class.getName()).log(Level.SEVERE, null, ex);
            }
        }
        if(jTable2.getModel().getValueAt(6,4)!=""){
           profdias.setId_dias(5); 
           profdias.setId_aula(7);
           profdias.setId_prof(id_prof);
            try {
                profdiasmet.Adicionar(profdias);
            } catch (SQLException ex) {
                Logger.getLogger(Menu3.class.getName()).log(Level.SEVERE, null, ex);
            }
        }
        if(jTable2.getModel().getValueAt(7,4)!=""){
           profdias.setId_dias(5); 
           profdias.setId_aula(8);
           profdias.setId_prof(id_prof);
            try {
                profdiasmet.Adicionar(profdias);
            } catch (SQLException ex) {
                Logger.getLogger(Menu3.class.getName()).log(Level.SEVERE, null, ex);
            }
        }
        if(jTable2.getModel().getValueAt(8,4)!=""){
           profdias.setId_dias(5); 
           profdias.setId_aula(9);
           profdias.setId_prof(id_prof);
            try {
                profdiasmet.Adicionar(profdias);
            } catch (SQLException ex) {
                Logger.getLogger(Menu3.class.getName()).log(Level.SEVERE, null, ex);
            }
        }
        
        
        
    }

    private void limpaDadosADD() {
        Porenquanto.setM1("");
        Porenquanto.setM2("");
        Porenquanto.setM3("");
        Porenquanto.setM4("");
        Porenquanto.setM5("");
        Porenquanto.setM6("");
        Porenquanto.setM7("");
        Porenquanto.setM8("");
        Porenquanto.setM9("");
        Porenquanto.setM10("");
        Porenquanto.setM11("");
        Porenquanto.setM12("");
        Porenquanto.setM13("");
        Porenquanto.setM14("");
        Porenquanto.setM15("");
        Porenquanto.setM16("");
        Porenquanto.setM17("");
        Porenquanto.setM18("");
        Porenquanto.setM19("");
        Porenquanto.setM20("");
        Porenquanto.setM21("");
        Porenquanto.setM22("");
        Porenquanto.setM23("");
        Porenquanto.setM24("");
        Porenquanto.setM25("");
        Porenquanto.setM26("");
        disc1_prof.setText("");
        disc2_prof.setText("");
        disc3_prof.setText("");
        disc4_prof.setText("");
        disc5_prof.setText("");
        jTF_nome_prof.setText("");
        jTF_Carga_horaria_prof.setText("");
        desmarcarMouseClicked(null);
        VerificaSerieTurma();
        jRB_profissional_prof.setSelected(false);
        jRB_regular_prof.setSelected(false);
    }

    private void SerieTurma(int id_deste) {
        try {
            listaS=profserieturmamet.BuscarSerieProfessor(id_deste);
        } catch (SQLException ex) {
            Logger.getLogger(Menu3.class.getName()).log(Level.SEVERE, null, ex);
        }
        String[] ano,turma;
        ano=new String[listaS.size()];
        turma=new String[listaS.size()];
        
        for(int ind=0;listaS.size()>ind;ind++){
            serie = listaS.get(ind);
            ano[ind]=serie.getNome();
            turma[ind]=serie.getTurma();
            
            if("1".equals(ano[ind]) && "A".equals(turma[ind])){
                JLA1.setText("V");
                JLA1.setForeground(Color.GREEN);
               
            }
            if("1".equals(ano[ind]) && "B".equals(turma[ind])){
               JLB1.setText("V");
                JLB1.setForeground(Color.GREEN);
            }
            if("1".equals(ano[ind]) && "C".equals(turma[ind])){
                JLC1.setText("V");
                JLC1.setForeground(Color.GREEN);
            }
            if("1".equals(ano[ind]) && "D".equals(turma[ind])){
                JLD1.setText("V");
                JLD1.setForeground(Color.GREEN);
            }
            if("1".equals(ano[ind]) && "E".equals(turma[ind])){
                JLE1.setText("V");
                JLE1.setForeground(Color.GREEN);

            }
            if("1".equals(ano[ind]) && "F".equals(turma[ind])){
                JLF1.setText("V");
                JLF1.setForeground(Color.GREEN);
            }
            if("1".equals(ano[ind]) && "G".equals(turma[ind])){
                JLG1.setText("V");
                JLG1.setForeground(Color.GREEN);
            }
            if("1".equals(ano[ind]) && "H".equals(turma[ind])){
                JLH1.setText("V");
                JLH1.setForeground(Color.GREEN);
            }
            if("2".equals(ano[ind]) && "A".equals(turma[ind])){
               JLA2.setText("V");
               JLA2.setForeground(Color.GREEN);
   
            }
            if("2".equals(ano[ind]) && "B".equals(turma[ind])){
               JLB2.setText("V");
               JLB2.setForeground(Color.GREEN);
            }
            if("2".equals(ano[ind]) && "C".equals(turma[ind])){
               JLC2.setText("V");
               JLC2.setForeground(Color.GREEN);
            }
            if("2".equals(ano[ind]) && "D".equals(turma[ind])){
               JLD2.setText("V");
               JLD2.setForeground(Color.GREEN);
            }
            if("2".equals(ano[ind]) && "E".equals(turma[ind])){
               JLE2.setText("V");
               JLE2.setForeground(Color.GREEN);
            }
            if("2".equals(ano[ind]) && "F".equals(turma[ind])){
              JLF2.setText("V");
               JLF2.setForeground(Color.GREEN);
            }
             if("2".equals(ano[ind]) && "G".equals(turma[ind])){
               JLG2.setText("V");
               JLG2.setForeground(Color.GREEN);
            }
              if("2".equals(ano[ind]) && "H".equals(turma[ind])){
                JLH2.setText("V");
               JLH2.setForeground(Color.GREEN);
            }
            if("3".equals(ano[ind]) && "A".equals(turma[ind])){
              JLA3.setText("V");
              JLA3.setForeground(Color.GREEN);
            }
            if("3".equals(ano[ind]) && "B".equals(turma[ind])){
               JLB3.setText("V");
              JLB3.setForeground(Color.GREEN);
            }
            if("3".equals(ano[ind]) && "C".equals(turma[ind])){
              JLC3.setText("V");
              JLC3.setForeground(Color.GREEN);
            }
            if("3".equals(ano[ind]) && "D".equals(turma[ind])){
               JLD3.setText("V");
              JLD3.setForeground(Color.GREEN);
            }
            if("3".equals(ano[ind]) && "E".equals(turma[ind])){
               JLE3.setText("V");
              JLE3.setForeground(Color.GREEN);
            }
            if("3".equals(ano[ind]) && "F".equals(turma[ind])){
              JLF3.setText("V");
              JLF3.setForeground(Color.GREEN);
            }
            if("3".equals(ano[ind]) && "G".equals(turma[ind])){
             JLG3.setText("V");
              JLG3.setForeground(Color.GREEN);
            }
            if("3".equals(ano[ind]) && "H".equals(turma[ind])){
              JLH3.setText("V");
              JLH3.setForeground(Color.GREEN);
            }
        }
    }

    private void BuscaMaterias(int id_deste) {
       listaD=profdiscmet.BuscaDiscProf(id_deste);
       List<Disciplina> DiscEixo=profdiscmet.BuscaNomeDisciEixo(id_deste);
       String[] nome_eixo=new String[DiscEixo.size()];
       String[] nome_disciplinas= new String[listaD.size()];
        for(int ind=0;listaD.size()>ind;ind++){
            disciplina = listaD.get(ind);
            nome_disciplinas[ind]=disciplina.getNome();
            System.out.println("materia "+nome_disciplinas[ind]); 
            
            if("Clique aqui para adicionar uma disciplina".equals(disc1_prof.getText())&& !disc2_prof.getText().equals(nome_disciplinas[ind])&& !disc3_prof.getText().equals(nome_disciplinas[ind])&& !disc4_prof.getText().equals(nome_disciplinas[ind]) && !disc5_prof.getText().equals(nome_disciplinas[ind])){
            disc1_prof.setText(nome_disciplinas[ind]);
            }if("Clique aqui para adicionar uma disciplina".equals(disc2_prof.getText()) && !disc1_prof.getText().equals(nome_disciplinas[ind])&& !disc3_prof.getText().equals(nome_disciplinas[ind]) && !disc4_prof.getText().equals(nome_disciplinas[ind]) && !disc5_prof.getText().equals(nome_disciplinas[ind])){
            disc2_prof.setText(nome_disciplinas[ind]);
            }if("Clique aqui para adicionar uma disciplina".equals(disc3_prof.getText())&& !disc1_prof.getText().equals(nome_disciplinas[ind]) && !disc2_prof.getText().equals(nome_disciplinas[ind])&& !disc4_prof.getText().equals(nome_disciplinas[ind]) && !disc5_prof.getText().equals(nome_disciplinas[ind])){
            disc3_prof.setText(nome_disciplinas[ind]);
            }if("Clique aqui para adicionar uma disciplina".equals(disc4_prof.getText())&& !disc1_prof.getText().equals(nome_disciplinas[ind]) && !disc2_prof.getText().equals(nome_disciplinas[ind]) && !disc3_prof.getText().equals(nome_disciplinas[ind]) && !disc5_prof.getText().equals(nome_disciplinas[ind])){
            disc4_prof.setText(nome_disciplinas[ind]);
            }if("Clique aqui para adicionar uma disciplina".equals(disc5_prof.getText())&& !disc1_prof.getText().equals(nome_disciplinas[ind]) && !disc2_prof.getText().equals(nome_disciplinas[ind]) && !disc3_prof.getText().equals(nome_disciplinas[ind])&& !disc4_prof.getText().equals(nome_disciplinas[ind])){
            disc5_prof.setText(nome_disciplinas[ind]);
            }
            
        }
        for(int ind=0;DiscEixo.size()>ind;ind++){
            disciplina = DiscEixo.get(ind);
            nome_eixo[ind]=disciplina.getEixo();
            System.out.println("eixo "+nome_eixo[ind]); 
            
            if("".equals(EixoR_prof.getText()) && "Regular".equals(nome_eixo[ind])){
            EixoR_prof.setText(nome_eixo[ind]);
            } if("".equals(EixoP_prof.getText()) && "Profissional".equals(nome_eixo[ind])){
            EixoP_prof.setText(nome_eixo[ind]);
            }
            
        }
        if(listaD.isEmpty()){
               disc1_prof.setText("Clique aqui para adicionar uma disciplina"); 
               disc2_prof.setText("Clique aqui para adicionar uma disciplina"); 
               disc3_prof.setText("Clique aqui para adicionar uma disciplina"); 
               disc4_prof.setText("Clique aqui para adicionar uma disciplina"); 
               disc5_prof.setText("Clique aqui para adicionar uma disciplina"); 
            }
        if(DiscEixo.isEmpty()){
               EixoP_prof.setText(""); 
               EixoR_prof.setText(""); 
               
            }
    }

    
    private void BuscarDias(int id_deste) {
        try {
            listaPD=profdiasmet.BuscaProfDias(id_deste);
        } catch (SQLException ex) {
            Logger.getLogger(Menu3.class.getName()).log(Level.SEVERE, null, ex);
        }
        int[] aulas=new int[listaPD.size()];
       int[] dias=new int[listaPD.size()];
        
        for(int ind=0;listaPD.size()>ind;ind++){
            profdias = listaPD.get(ind);
            dias[ind]=profdias.getId_dias();
            aulas[ind]=profdias.getId_aula();
            if(dias[ind]==1 && aulas[ind]==1){
            jTable2.getModel().setValueAt("    Disponível", 0,0); 
            }
            if(dias[ind]==1 && aulas[ind]==2){
            jTable2.getModel().setValueAt("    Disponível", 1,0); 
            }
            if(dias[ind]==1 && aulas[ind]==3){
            jTable2.getModel().setValueAt("    Disponível", 2,0); 
            }
            if(dias[ind]==1 && aulas[ind]==4){
            jTable2.getModel().setValueAt("    Disponível", 3,0); 
            }
            if(dias[ind]==1 && aulas[ind]==5){
            jTable2.getModel().setValueAt("    Disponível", 4,0); 
            }
            if(dias[ind]==1 && aulas[ind]==7){
            jTable2.getModel().setValueAt("    Disponível", 6,0); 
            }
            if(dias[ind]==1 && aulas[ind]==8){
            jTable2.getModel().setValueAt("    Disponível", 7,0); 
            }
            if(dias[ind]==1 && aulas[ind]==9){
            jTable2.getModel().setValueAt("    Disponível", 8,0); 
            }
            
            if(dias[ind]==1 && aulas[ind]==6){
            jTable2.getModel().setValueAt("    Disponível", 5,0); 
            }
            if(dias[ind]==2 && aulas[ind]==1){
            jTable2.getModel().setValueAt("    Disponível", 0,1); 
            }
            if(dias[ind]==2 && aulas[ind]==2){
            jTable2.getModel().setValueAt("    Disponível", 1,1); 
            }
            if(dias[ind]==2 && aulas[ind]==3){
            jTable2.getModel().setValueAt("    Disponível", 2,1); 
            }
            if(dias[ind]==2 && aulas[ind]==4){
            jTable2.getModel().setValueAt("    Disponível", 3,1); 
            }
            if(dias[ind]==2 && aulas[ind]==5){
            jTable2.getModel().setValueAt("    Disponível", 4,1); 
            }
            if(dias[ind]==2 && aulas[ind]==7){
            jTable2.getModel().setValueAt("    Disponível", 6,1); 
            }
            if(dias[ind]==2 && aulas[ind]==8){
            jTable2.getModel().setValueAt("    Disponível", 7,1); 
            }
            if(dias[ind]==2 && aulas[ind]==9){
            jTable2.getModel().setValueAt("    Disponível", 8,1); 
            }
            
            if(dias[ind]==2 && aulas[ind]==6){
            jTable2.getModel().setValueAt("    Disponível", 5,1); 
            }
            if(dias[ind]==3 && aulas[ind]==1){
            jTable2.getModel().setValueAt("    Disponível", 0,2); 
            }
            if(dias[ind]==3 && aulas[ind]==2){
            jTable2.getModel().setValueAt("    Disponível", 1,2); 
            }
            if(dias[ind]==3 && aulas[ind]==3){
            jTable2.getModel().setValueAt("    Disponível", 2,2); 
            }
            if(dias[ind]==3 && aulas[ind]==4){
            jTable2.getModel().setValueAt("    Disponível", 3,2); 
            }
            if(dias[ind]==3 && aulas[ind]==5){
            jTable2.getModel().setValueAt("    Disponível", 4,2); 
            }
            if(dias[ind]==3 && aulas[ind]==7){
            jTable2.getModel().setValueAt("    Disponível", 6,2); 
            }
            if(dias[ind]==3 && aulas[ind]==8){
            jTable2.getModel().setValueAt("    Disponível", 7,2); 
            }
            if(dias[ind]==3 && aulas[ind]==9){
            jTable2.getModel().setValueAt("    Disponível", 8,2); 
            }
            
             if(dias[ind]==3 && aulas[ind]==6){
            jTable2.getModel().setValueAt("    Disponível", 5,2); 
            }
            if(dias[ind]==4 && aulas[ind]==1){
            jTable2.getModel().setValueAt("    Disponível", 0,3); 
            }
            if(dias[ind]==4 && aulas[ind]==2){
            jTable2.getModel().setValueAt("    Disponível", 1,3); 
            }
            if(dias[ind]==4 && aulas[ind]==3){
            jTable2.getModel().setValueAt("    Disponível", 2,3); 
            }
            if(dias[ind]==4 && aulas[ind]==4){
            jTable2.getModel().setValueAt("    Disponível", 3,3); 
            }
            if(dias[ind]==4 && aulas[ind]==5){
            jTable2.getModel().setValueAt("    Disponível", 4,3); 
            }
            if(dias[ind]==4 && aulas[ind]==7){
            jTable2.getModel().setValueAt("    Disponível", 6,3); 
            }
            if(dias[ind]==4 && aulas[ind]==8){
            jTable2.getModel().setValueAt("    Disponível", 7,3); 
            }
            if(dias[ind]==4 && aulas[ind]==9){
            jTable2.getModel().setValueAt("    Disponível", 8,3); 
            }
            
            if(dias[ind]==4 && aulas[ind]==6){
            jTable2.getModel().setValueAt("    Disponível", 5,3); 
            }
            if(dias[ind]==5 && aulas[ind]==1){
            jTable2.getModel().setValueAt("    Disponível", 0,4); 
            }
            if(dias[ind]==5 && aulas[ind]==2){
            jTable2.getModel().setValueAt("    Disponível", 1,4); 
            }
            if(dias[ind]==5 && aulas[ind]==3){
            jTable2.getModel().setValueAt("    Disponível", 2,4); 
            }
            if(dias[ind]==5 && aulas[ind]==4){
            jTable2.getModel().setValueAt("    Disponível", 3,4); 
            }
            if(dias[ind]==5 && aulas[ind]==5){
            jTable2.getModel().setValueAt("    Disponível", 4,4); 
            }
            if(dias[ind]==5 && aulas[ind]==7){
            jTable2.getModel().setValueAt("    Disponível", 6,4); 
            }
            if(dias[ind]==5 && aulas[ind]==8){
            jTable2.getModel().setValueAt("    Disponível", 7,4); 
            }
            if(dias[ind]==5 && aulas[ind]==9){
            jTable2.getModel().setValueAt("    Disponível", 8,4); 
            }
            
            if(dias[ind]==5 && aulas[ind]==6){
            jTable2.getModel().setValueAt("    Disponível", 5,4); 
            }
        }
        if(listaPD.isEmpty()){
        jTable2.getModel().setValueAt("", 0,0);
        jTable2.getModel().setValueAt("", 1,0);
        jTable2.getModel().setValueAt("", 2,0);
        jTable2.getModel().setValueAt("", 3,0);
        jTable2.getModel().setValueAt("", 4,0);
        jTable2.getModel().setValueAt("", 5,0);
        jTable2.getModel().setValueAt("", 6,0);
        jTable2.getModel().setValueAt("", 7,0);
        jTable2.getModel().setValueAt("", 8,0);
        
        jTable2.getModel().setValueAt("", 0,1);
        jTable2.getModel().setValueAt("", 1,1);
        jTable2.getModel().setValueAt("", 2,1);
        jTable2.getModel().setValueAt("", 3,1);
        jTable2.getModel().setValueAt("", 4,1);
        jTable2.getModel().setValueAt("", 5,1);
        jTable2.getModel().setValueAt("", 6,1);
        jTable2.getModel().setValueAt("", 7,1);
        jTable2.getModel().setValueAt("", 8,1);
        
        jTable2.getModel().setValueAt("", 0,2);
        jTable2.getModel().setValueAt("", 1,2);
        jTable2.getModel().setValueAt("", 2,2);
        jTable2.getModel().setValueAt("", 3,2);
        jTable2.getModel().setValueAt("", 4,2);
        jTable2.getModel().setValueAt("", 5,2);
        jTable2.getModel().setValueAt("", 6,2);
        jTable2.getModel().setValueAt("", 7,2);
        jTable2.getModel().setValueAt("", 8,2);
        
        jTable2.getModel().setValueAt("", 0,3);
        jTable2.getModel().setValueAt("", 1,3);
        jTable2.getModel().setValueAt("", 2,3);
        jTable2.getModel().setValueAt("", 3,3);
        jTable2.getModel().setValueAt("", 4,3);
        jTable2.getModel().setValueAt("", 5,3);
        jTable2.getModel().setValueAt("", 6,3);
        jTable2.getModel().setValueAt("", 7,3);
        jTable2.getModel().setValueAt("", 8,3);
        
        jTable2.getModel().setValueAt("", 0,4);
        jTable2.getModel().setValueAt("", 1,4);
        jTable2.getModel().setValueAt("", 2,4);
        jTable2.getModel().setValueAt("", 3,4);
        jTable2.getModel().setValueAt("", 4,4);
        jTable2.getModel().setValueAt("", 5,4);
        jTable2.getModel().setValueAt("", 6,4);
        jTable2.getModel().setValueAt("", 7,4);
        jTable2.getModel().setValueAt("", 8,4);
        
        }
    }

    
    private void limpaDadosALTDEL() {
        jTF_nome_prof.setText("");
        jTF_Carga_horaria_prof.setText("");
        EixoR_prof.setText("");
        EixoP_prof.setText("");
        disc1_prof.setText("");
        disc2_prof.setText("");
        disc3_prof.setText("");
        disc4_prof.setText("");
        disc5_prof.setText("");
        JLA1.setText("X");
        JLA1.setForeground(Color.white);
        JLA2.setText("X");
        JLA2.setForeground(Color.white);
        JLA3.setText("X");
        JLA3.setForeground(Color.white);
        JLB1.setText("X");
        JLB1.setForeground(Color.white);
        JLB2.setText("X");
        JLB2.setForeground(Color.white);
        JLB3.setText("X");
        JLB3.setForeground(Color.white);
        JLC1.setText("X");
        JLC1.setForeground(Color.white);
        JLC2.setText("X");
        JLC2.setForeground(Color.white);
        JLC3.setText("X");
        JLC3.setForeground(Color.white);
        JLD1.setText("X");
        JLD1.setForeground(Color.white);
        JLD2.setText("X");
        JLD2.setForeground(Color.white);
        JLD3.setText("X");
        JLD3.setForeground(Color.white);
        JLE1.setText("X");
        JLE1.setForeground(Color.white);
        JLE2.setText("X");
        JLE2.setForeground(Color.white);
        JLE3.setText("X");
        JLE3.setForeground(Color.white);
        JLF1.setText("X");
        JLF1.setForeground(Color.white);
        JLF2.setText("X");
        JLF2.setForeground(Color.white);
        JLF3.setText("X");
        JLF3.setForeground(Color.white);
        JLG1.setText("X");
        JLG1.setForeground(Color.white);
        JLG2.setText("X");
        JLG2.setForeground(Color.white);
        JLG3.setText("X");
        JLG3.setForeground(Color.white);
        JLH1.setText("X");
        JLH1.setForeground(Color.white);
        JLH2.setText("X");
        JLH2.setForeground(Color.white);
        JLH3.setText("X");
        JLH3.setForeground(Color.white);
        desmarcarMouseClicked(null);
       
    }

    private void AlterarProfessor(int id_deste) {
         int resp = JOptionPane.showConfirmDialog(this, "Deseja realmente alterar este professor?",
                "Confirmação", JOptionPane.YES_NO_OPTION);

        if (resp == JOptionPane.YES_NO_OPTION) {
            Professor prof=new Professor();
            ProfessorMet dao=new ProfessorMet();
            prof.setId(id_deste);
            prof.setNome(jTF_nome_prof.getText());
            prof.setCarga_horaria(Integer.parseInt(jTF_Carga_horaria_prof.getText()));
            dao.alterarProf(prof);
            System.out.println("o id do prof é"+id_deste);
            System.out.println("ate aki BLZ");
            ProfessorDiasMet diamet=new ProfessorDiasMet();
            diamet.Deleta(id_deste);
            ChamaAdicionarDias(id_deste);
            System.out.println("ate aki belez tambem");
            profserieturmamet.Deletar(id_deste);
            ChamaAdicionarSerie(id_deste);
            System.out.println("aki tambem ta blz");
            profdiscmet.Deletar(id_deste);
            ChamaAdicionaDisc(id_deste);
            JOptionPane.showMessageDialog(null, "Alterado com sucesso");
         limpaDadosALTDEL();
         DesabilitaALTDEL();
         DesabilitaADD();
         listarProfessor();
         jDialog1.setVisible(true);


        }
    }

    private void ChamaAdicionarDias(int id_prof) {
      if(jTable2.getModel().getValueAt(0,0)!=""){
           profdias.setId_dias(1); 
           profdias.setId_aula(1);
           profdias.setId_prof(id_prof);
            try {
                profdiasmet.Adicionar(profdias);
                System.out.println("adicionou");
            } catch (SQLException ex) {
                Logger.getLogger(Menu3.class.getName()).log(Level.SEVERE, null, ex);
            }
        }
        if(jTable2.getModel().getValueAt(1,0)!=""){
           profdias.setId_dias(1); 
           profdias.setId_aula(2);
           profdias.setId_prof(id_prof);
            try {
                profdiasmet.Adicionar(profdias);
            } catch (SQLException ex) {
                Logger.getLogger(Menu3.class.getName()).log(Level.SEVERE, null, ex);
            }
        }
        if(jTable2.getModel().getValueAt(2,0)!=""){
           profdias.setId_dias(1); 
           profdias.setId_aula(3);
           profdias.setId_prof(id_prof);
            try {
                profdiasmet.Adicionar(profdias);
            } catch (SQLException ex) {
                Logger.getLogger(Menu3.class.getName()).log(Level.SEVERE, null, ex);
            }
        }
        if(jTable2.getModel().getValueAt(3,0)!=""){
           profdias.setId_dias(1); 
           profdias.setId_aula(4);
           profdias.setId_prof(id_prof);
            try {
                profdiasmet.Adicionar(profdias);
            } catch (SQLException ex) {
                Logger.getLogger(Menu3.class.getName()).log(Level.SEVERE, null, ex);
            }
        }
        if(jTable2.getModel().getValueAt(4,0)!=""){
           profdias.setId_dias(1); 
           profdias.setId_aula(5);
           profdias.setId_prof(id_prof);
            try {
                profdiasmet.Adicionar(profdias);
            } catch (SQLException ex) {
                Logger.getLogger(Menu3.class.getName()).log(Level.SEVERE, null, ex);
            }
        }
        if(jTable2.getModel().getValueAt(5,0)!=""){
           profdias.setId_dias(1); 
           profdias.setId_aula(6);
           profdias.setId_prof(id_prof);
            try {
                profdiasmet.Adicionar(profdias);
            } catch (SQLException ex) {
                Logger.getLogger(Menu3.class.getName()).log(Level.SEVERE, null, ex);
            }
        }
        if(jTable2.getModel().getValueAt(6,0)!=""){
           profdias.setId_dias(1); 
           profdias.setId_aula(7);
           profdias.setId_prof(id_prof);
            try {
                profdiasmet.Adicionar(profdias);
            } catch (SQLException ex) {
                Logger.getLogger(Menu3.class.getName()).log(Level.SEVERE, null, ex);
            }
        }
        if(jTable2.getModel().getValueAt(7,0)!=""){
           profdias.setId_dias(1); 
           profdias.setId_aula(8);
           profdias.setId_prof(id_prof);
            try {
                profdiasmet.Adicionar(profdias);
            } catch (SQLException ex) {
                Logger.getLogger(Menu3.class.getName()).log(Level.SEVERE, null, ex);
            }
        }
        if(jTable2.getModel().getValueAt(8,0)!=""){
           profdias.setId_dias(1); 
           profdias.setId_aula(9);
           profdias.setId_prof(id_prof);
            try {
                profdiasmet.Adicionar(profdias);
            } catch (SQLException ex) {
                Logger.getLogger(Menu3.class.getName()).log(Level.SEVERE, null, ex);
            }
        }
       
        if(jTable2.getModel().getValueAt(0,1)!=""){
           profdias.setId_dias(2); 
           profdias.setId_aula(1);
           profdias.setId_prof(id_prof);
            try {
                profdiasmet.Adicionar(profdias);
            } catch (SQLException ex) {
                Logger.getLogger(Menu3.class.getName()).log(Level.SEVERE, null, ex);
            }
        }
        if(jTable2.getModel().getValueAt(1,1)!=""){
           profdias.setId_dias(2); 
           profdias.setId_aula(2);
           profdias.setId_prof(id_prof);
            try {
                profdiasmet.Adicionar(profdias);
            } catch (SQLException ex) {
                Logger.getLogger(Menu3.class.getName()).log(Level.SEVERE, null, ex);
            }
        }
        if(jTable2.getModel().getValueAt(2,1)!=""){
           profdias.setId_dias(2); 
           profdias.setId_aula(3);
           profdias.setId_prof(id_prof);
            try {
                profdiasmet.Adicionar(profdias);
            } catch (SQLException ex) {
                Logger.getLogger(Menu3.class.getName()).log(Level.SEVERE, null, ex);
            }
        }
        if(jTable2.getModel().getValueAt(3,1)!=""){
           profdias.setId_dias(2); 
           profdias.setId_aula(4);
           profdias.setId_prof(id_prof);
            try {
                profdiasmet.Adicionar(profdias);
            } catch (SQLException ex) {
                Logger.getLogger(Menu3.class.getName()).log(Level.SEVERE, null, ex);
            }
        }
        if(jTable2.getModel().getValueAt(4,1)!=""){
           profdias.setId_dias(2); 
           profdias.setId_aula(5);
           profdias.setId_prof(id_prof);
            try {
                profdiasmet.Adicionar(profdias);
            } catch (SQLException ex) {
                Logger.getLogger(Menu3.class.getName()).log(Level.SEVERE, null, ex);
            }
        }
        if(jTable2.getModel().getValueAt(6,1)!=""){
           profdias.setId_dias(2); 
           profdias.setId_aula(7);
           profdias.setId_prof(id_prof);
            try {
                profdiasmet.Adicionar(profdias);
            } catch (SQLException ex) {
                Logger.getLogger(Menu3.class.getName()).log(Level.SEVERE, null, ex);
            }
        }
        if(jTable2.getModel().getValueAt(7,1)!=""){
           profdias.setId_dias(2); 
           profdias.setId_aula(8);
           profdias.setId_prof(id_prof);
            try {
                profdiasmet.Adicionar(profdias);
            } catch (SQLException ex) {
                Logger.getLogger(Menu3.class.getName()).log(Level.SEVERE, null, ex);
            }
        }
        if(jTable2.getModel().getValueAt(8,1)!=""){
           profdias.setId_dias(2); 
           profdias.setId_aula(9);
           profdias.setId_prof(id_prof);
            try {
                profdiasmet.Adicionar(profdias);
            } catch (SQLException ex) {
                Logger.getLogger(Menu3.class.getName()).log(Level.SEVERE, null, ex);
            }
        }
        
        if(jTable2.getModel().getValueAt(5,1)!=""){
           profdias.setId_dias(2); 
           profdias.setId_aula(6);
           profdias.setId_prof(id_prof);
            try {
                profdiasmet.Adicionar(profdias);
            } catch (SQLException ex) {
                Logger.getLogger(Menu3.class.getName()).log(Level.SEVERE, null, ex);
            }
        }
        if(jTable2.getModel().getValueAt(0,2)!=""){
           profdias.setId_dias(3); 
           profdias.setId_aula(1);
           profdias.setId_prof(id_prof);
            try {
                profdiasmet.Adicionar(profdias);
            } catch (SQLException ex) {
                Logger.getLogger(Menu3.class.getName()).log(Level.SEVERE, null, ex);
            }
        }
        if(jTable2.getModel().getValueAt(1,2)!=""){
           profdias.setId_dias(3); 
           profdias.setId_aula(2);
           profdias.setId_prof(id_prof);
            try {
                profdiasmet.Adicionar(profdias);
            } catch (SQLException ex) {
                Logger.getLogger(Menu3.class.getName()).log(Level.SEVERE, null, ex);
            }
        }
        if(jTable2.getModel().getValueAt(2,2)!=""){
           profdias.setId_dias(3); 
           profdias.setId_aula(3);
           profdias.setId_prof(id_prof);
            try {
                profdiasmet.Adicionar(profdias);
            } catch (SQLException ex) {
                Logger.getLogger(Menu3.class.getName()).log(Level.SEVERE, null, ex);
            }
        }
        if(jTable2.getModel().getValueAt(3,2)!=""){
           profdias.setId_dias(3); 
           profdias.setId_aula(4);
           profdias.setId_prof(id_prof);
            try {
                profdiasmet.Adicionar(profdias);
            } catch (SQLException ex) {
                Logger.getLogger(Menu3.class.getName()).log(Level.SEVERE, null, ex);
            }
        }
        if(jTable2.getModel().getValueAt(4,2)!=""){
           profdias.setId_dias(3); 
           profdias.setId_aula(5);
           profdias.setId_prof(id_prof);
            try {
                profdiasmet.Adicionar(profdias);
            } catch (SQLException ex) {
                Logger.getLogger(Menu3.class.getName()).log(Level.SEVERE, null, ex);
            }
        }
        if(jTable2.getModel().getValueAt(6,2)!=""){
           profdias.setId_dias(3); 
           profdias.setId_aula(7);
           profdias.setId_prof(id_prof);
            try {
                profdiasmet.Adicionar(profdias);
            } catch (SQLException ex) {
                Logger.getLogger(Menu3.class.getName()).log(Level.SEVERE, null, ex);
            }
        }
        if(jTable2.getModel().getValueAt(7,2)!=""){
           profdias.setId_dias(3); 
           profdias.setId_aula(8);
           profdias.setId_prof(id_prof);
            try {
                profdiasmet.Adicionar(profdias);
            } catch (SQLException ex) {
                Logger.getLogger(Menu3.class.getName()).log(Level.SEVERE, null, ex);
            }
        }
        if(jTable2.getModel().getValueAt(8,2)!=""){
           profdias.setId_dias(3); 
           profdias.setId_aula(9);
           profdias.setId_prof(id_prof);
            try {
                profdiasmet.Adicionar(profdias);
            } catch (SQLException ex) {
                Logger.getLogger(Menu3.class.getName()).log(Level.SEVERE, null, ex);
            }
        }
        
        if(jTable2.getModel().getValueAt(5,2)!=""){
           profdias.setId_dias(3); 
           profdias.setId_aula(6);
           profdias.setId_prof(id_prof);
            try {
                profdiasmet.Adicionar(profdias);
            } catch (SQLException ex) {
                Logger.getLogger(Menu3.class.getName()).log(Level.SEVERE, null, ex);
            }
        }
        if(jTable2.getModel().getValueAt(0,3)!=""){
           profdias.setId_dias(4); 
           profdias.setId_aula(1);
           profdias.setId_prof(id_prof);
            try {
                profdiasmet.Adicionar(profdias);
            } catch (SQLException ex) {
                Logger.getLogger(Menu3.class.getName()).log(Level.SEVERE, null, ex);
            }
        }
        if(jTable2.getModel().getValueAt(1,3)!=""){
           profdias.setId_dias(4); 
           profdias.setId_aula(2);
           profdias.setId_prof(id_prof);
            try {
                profdiasmet.Adicionar(profdias);
            } catch (SQLException ex) {
                Logger.getLogger(Menu3.class.getName()).log(Level.SEVERE, null, ex);
            }
        }
        if(jTable2.getModel().getValueAt(2,3)!=""){
           profdias.setId_dias(4); 
           profdias.setId_aula(3);
           profdias.setId_prof(id_prof);
            try {
                profdiasmet.Adicionar(profdias);
            } catch (SQLException ex) {
                Logger.getLogger(Menu3.class.getName()).log(Level.SEVERE, null, ex);
            }
        }
        if(jTable2.getModel().getValueAt(3,3)!=""){
           profdias.setId_dias(4); 
           profdias.setId_aula(4);
           profdias.setId_prof(id_prof);
            try {
                profdiasmet.Adicionar(profdias);
            } catch (SQLException ex) {
                Logger.getLogger(Menu3.class.getName()).log(Level.SEVERE, null, ex);
            }
        }
        if(jTable2.getModel().getValueAt(4,3)!=""){
           profdias.setId_dias(4); 
           profdias.setId_aula(5);
           profdias.setId_prof(id_prof);
            try {
                profdiasmet.Adicionar(profdias);
            } catch (SQLException ex) {
                Logger.getLogger(Menu3.class.getName()).log(Level.SEVERE, null, ex);
            }
        }
        if(jTable2.getModel().getValueAt(6,3)!=""){
           profdias.setId_dias(4); 
           profdias.setId_aula(7);
           profdias.setId_prof(id_prof);
            try {
                profdiasmet.Adicionar(profdias);
            } catch (SQLException ex) {
                Logger.getLogger(Menu3.class.getName()).log(Level.SEVERE, null, ex);
            }
        }
        if(jTable2.getModel().getValueAt(7,3)!=""){
           profdias.setId_dias(4); 
           profdias.setId_aula(8);
           profdias.setId_prof(id_prof);
            try {
                profdiasmet.Adicionar(profdias);
            } catch (SQLException ex) {
                Logger.getLogger(Menu3.class.getName()).log(Level.SEVERE, null, ex);
            }
        }
        if(jTable2.getModel().getValueAt(8,3)!=""){
           profdias.setId_dias(4); 
           profdias.setId_aula(9);
           profdias.setId_prof(id_prof);
            try {
                profdiasmet.Adicionar(profdias);
            } catch (SQLException ex) {
                Logger.getLogger(Menu3.class.getName()).log(Level.SEVERE, null, ex);
            }
        }
        
        if(jTable2.getModel().getValueAt(5,3)!=""){
           profdias.setId_dias(4); 
           profdias.setId_aula(6);
           profdias.setId_prof(id_prof);
            try {
                profdiasmet.Adicionar(profdias);
            } catch (SQLException ex) {
                Logger.getLogger(Menu3.class.getName()).log(Level.SEVERE, null, ex);
            }
        }
        if(jTable2.getModel().getValueAt(0,4)!=""){
           profdias.setId_dias(5); 
           profdias.setId_aula(1);
           profdias.setId_prof(id_prof);
            try {
                profdiasmet.Adicionar(profdias);
            } catch (SQLException ex) {
                Logger.getLogger(Menu3.class.getName()).log(Level.SEVERE, null, ex);
            }
        }
        if(jTable2.getModel().getValueAt(1,4)!=""){
           profdias.setId_dias(5); 
           profdias.setId_aula(2);
           profdias.setId_prof(id_prof);
            try {
                profdiasmet.Adicionar(profdias);
            } catch (SQLException ex) {
                Logger.getLogger(Menu3.class.getName()).log(Level.SEVERE, null, ex);
            }
        }
        if(jTable2.getModel().getValueAt(2,4)!=""){
           profdias.setId_dias(5); 
           profdias.setId_aula(3);
           profdias.setId_prof(id_prof);
            try {
                profdiasmet.Adicionar(profdias);
            } catch (SQLException ex) {
                Logger.getLogger(Menu3.class.getName()).log(Level.SEVERE, null, ex);
            }
        }
        if(jTable2.getModel().getValueAt(3,4)!=""){
           profdias.setId_dias(5); 
           profdias.setId_aula(4);
           profdias.setId_prof(id_prof);
            try {
                profdiasmet.Adicionar(profdias);
            } catch (SQLException ex) {
                Logger.getLogger(Menu3.class.getName()).log(Level.SEVERE, null, ex);
            }
        }
        if(jTable2.getModel().getValueAt(4,4)!=""){
           profdias.setId_dias(5); 
           profdias.setId_aula(5);
           profdias.setId_prof(id_prof);
            try {
                profdiasmet.Adicionar(profdias);
            } catch (SQLException ex) {
                Logger.getLogger(Menu3.class.getName()).log(Level.SEVERE, null, ex);
            }
        }
        if(jTable2.getModel().getValueAt(6,4)!=""){
           profdias.setId_dias(5); 
           profdias.setId_aula(7);
           profdias.setId_prof(id_prof);
            try {
                profdiasmet.Adicionar(profdias);
            } catch (SQLException ex) {
                Logger.getLogger(Menu3.class.getName()).log(Level.SEVERE, null, ex);
            }
        }
        if(jTable2.getModel().getValueAt(7,4)!=""){
           profdias.setId_dias(5); 
           profdias.setId_aula(8);
           profdias.setId_prof(id_prof);
            try {
                profdiasmet.Adicionar(profdias);
            } catch (SQLException ex) {
                Logger.getLogger(Menu3.class.getName()).log(Level.SEVERE, null, ex);
            }
        }
        if(jTable2.getModel().getValueAt(8,4)!=""){
           profdias.setId_dias(5); 
           profdias.setId_aula(9);
           profdias.setId_prof(id_prof);
            try {
                profdiasmet.Adicionar(profdias);
            } catch (SQLException ex) {
                Logger.getLogger(Menu3.class.getName()).log(Level.SEVERE, null, ex);
            }
        }
        
        if(jTable2.getModel().getValueAt(5,4)!=""){
           profdias.setId_dias(5); 
           profdias.setId_aula(6);
           profdias.setId_prof(id_prof);
            try {
                profdiasmet.Adicionar(profdias);
            } catch (SQLException ex) {
                Logger.getLogger(Menu3.class.getName()).log(Level.SEVERE, null, ex);
            }
        }
    }

    private void ChamaAdicionarSerie(int id_prof) {
       if("V".equals(JLA1.getText())){
            try {
                serie=seriemet.BuscarSeriePorAnoeTurma("1","A");
            } catch (SQLException ex) {
                Logger.getLogger(Menu3.class.getName()).log(Level.SEVERE, null, ex);
            }
            System.out.println(""+serie.getId());
            profserieturmamet.AdicionaProfSerie(id_prof,serie);    
        }
        if("V".equals(JLA2.getText())){
            try {
                serie=seriemet.BuscarSeriePorAnoeTurma("2","A");
            } catch (SQLException ex) {
                Logger.getLogger(Menu3.class.getName()).log(Level.SEVERE, null, ex);
            }
            System.out.println(""+serie.getId());
            profserieturmamet.AdicionaProfSerie(id_prof,serie);    
        }
        if("V".equals(JLA3.getText())){
            try {
                serie=seriemet.BuscarSeriePorAnoeTurma("3","A");
            } catch (SQLException ex) {
                Logger.getLogger(Menu3.class.getName()).log(Level.SEVERE, null, ex);
            }
            System.out.println(""+serie.getId());
            profserieturmamet.AdicionaProfSerie(id_prof,serie);    
        }
        if("V".equals(JLB1.getText())){
            try {
                serie=seriemet.BuscarSeriePorAnoeTurma("1","B");
            } catch (SQLException ex) {
                Logger.getLogger(Menu3.class.getName()).log(Level.SEVERE, null, ex);
            }
            System.out.println(""+serie.getId());
            profserieturmamet.AdicionaProfSerie(id_prof,serie);    
        }
        if("V".equals(JLB2.getText())){
            try {
                serie=seriemet.BuscarSeriePorAnoeTurma("2","B");
            } catch (SQLException ex) {
                Logger.getLogger(Menu3.class.getName()).log(Level.SEVERE, null, ex);
            }
            System.out.println(""+serie.getId());
            profserieturmamet.AdicionaProfSerie(id_prof,serie);    
        }
        if("V".equals(JLB3.getText())){
            try {
                serie=seriemet.BuscarSeriePorAnoeTurma("3","B");
            } catch (SQLException ex) {
                Logger.getLogger(Menu3.class.getName()).log(Level.SEVERE, null, ex);
            }
            System.out.println(""+serie.getId());
            profserieturmamet.AdicionaProfSerie(id_prof,serie);    
        }
        if("V".equals(JLC1.getText())){
            try {
                serie=seriemet.BuscarSeriePorAnoeTurma("1","C");
            } catch (SQLException ex) {
                Logger.getLogger(Menu3.class.getName()).log(Level.SEVERE, null, ex);
            }
            System.out.println(""+serie.getId());
            profserieturmamet.AdicionaProfSerie(id_prof,serie);    
        }
        if("V".equals(JLC2.getText())){
            try {
                serie=seriemet.BuscarSeriePorAnoeTurma("2","C");
            } catch (SQLException ex) {
                Logger.getLogger(Menu3.class.getName()).log(Level.SEVERE, null, ex);
            }
            System.out.println(""+serie.getId());
            profserieturmamet.AdicionaProfSerie(id_prof,serie);    
        }
        if("V".equals(JLC3.getText())){
            try {
                serie=seriemet.BuscarSeriePorAnoeTurma("3","C");
            } catch (SQLException ex) {
                Logger.getLogger(Menu3.class.getName()).log(Level.SEVERE, null, ex);
            }
            System.out.println(""+serie.getId());
            profserieturmamet.AdicionaProfSerie(id_prof,serie);    
        }
        if("V".equals(JLD1.getText())){
            try {
                serie=seriemet.BuscarSeriePorAnoeTurma("1","D");
            } catch (SQLException ex) {
                Logger.getLogger(Menu3.class.getName()).log(Level.SEVERE, null, ex);
            }
            System.out.println(""+serie.getId());
            profserieturmamet.AdicionaProfSerie(id_prof,serie);    
        }
        if("V".equals(JLD2.getText())){
            try {
                serie=seriemet.BuscarSeriePorAnoeTurma("2","D");
            } catch (SQLException ex) {
                Logger.getLogger(Menu3.class.getName()).log(Level.SEVERE, null, ex);
            }
            profserieturmamet.AdicionaProfSerie(id_prof,serie);    
        }
        if("V".equals(JLD3.getText())){
            try {
                serie=seriemet.BuscarSeriePorAnoeTurma("3","D");
            } catch (SQLException ex) {
                Logger.getLogger(Menu3.class.getName()).log(Level.SEVERE, null, ex);
            }
            profserieturmamet.AdicionaProfSerie(id_prof,serie);    
        }
        if("V".equals(JLE1.getText())){
            try {
                serie=seriemet.BuscarSeriePorAnoeTurma("1","E");
            } catch (SQLException ex) {
                Logger.getLogger(Menu3.class.getName()).log(Level.SEVERE, null, ex);
            }
            profserieturmamet.AdicionaProfSerie(id_prof,serie);    
        }
        if("V".equals(JLE2.getText())){
            try {
                serie=seriemet.BuscarSeriePorAnoeTurma("2","E");
            } catch (SQLException ex) {
                Logger.getLogger(Menu3.class.getName()).log(Level.SEVERE, null, ex);
            }
            profserieturmamet.AdicionaProfSerie(id_prof,serie);    
        }
        if("V".equals(JLE3.getText())){
            try {
                serie=seriemet.BuscarSeriePorAnoeTurma("3","E");
            } catch (SQLException ex) {
                Logger.getLogger(Menu3.class.getName()).log(Level.SEVERE, null, ex);
            }
            profserieturmamet.AdicionaProfSerie(id_prof,serie);    
        }
        if("V".equals(JLF1.getText())){
            try {
                serie=seriemet.BuscarSeriePorAnoeTurma("1","F");
            } catch (SQLException ex) {
                Logger.getLogger(Menu3.class.getName()).log(Level.SEVERE, null, ex);
            }
            profserieturmamet.AdicionaProfSerie(id_prof,serie);    
        }
        if("V".equals(JLF2.getText())){
            try {
                serie=seriemet.BuscarSeriePorAnoeTurma("2","F");
            } catch (SQLException ex) {
                Logger.getLogger(Menu3.class.getName()).log(Level.SEVERE, null, ex);
            }
            profserieturmamet.AdicionaProfSerie(id_prof,serie);    
        }
        if("V".equals(JLF3.getText())){
            try {
                serie=seriemet.BuscarSeriePorAnoeTurma("3","F");
            } catch (SQLException ex) {
                Logger.getLogger(Menu3.class.getName()).log(Level.SEVERE, null, ex);
            }
            profserieturmamet.AdicionaProfSerie(id_prof,serie);    
        }
        if("V".equals(JLG1.getText())){
            try {
                serie=seriemet.BuscarSeriePorAnoeTurma("1","G");
            } catch (SQLException ex) {
                Logger.getLogger(Menu3.class.getName()).log(Level.SEVERE, null, ex);
            }
            profserieturmamet.AdicionaProfSerie(id_prof,serie);    
        }
        if("V".equals(JLG2.getText())){
            try {
                serie=seriemet.BuscarSeriePorAnoeTurma("2","G");
            } catch (SQLException ex) {
                Logger.getLogger(Menu3.class.getName()).log(Level.SEVERE, null, ex);
            }
            profserieturmamet.AdicionaProfSerie(id_prof,serie);    
        }
        if("V".equals(JLG3.getText())){
            try {
                serie=seriemet.BuscarSeriePorAnoeTurma("3","G");
            } catch (SQLException ex) {
                Logger.getLogger(Menu3.class.getName()).log(Level.SEVERE, null, ex);
            }
            profserieturmamet.AdicionaProfSerie(id_prof,serie);    
        }
        if("V".equals(JLH1.getText())){
            try {
                serie=seriemet.BuscarSeriePorAnoeTurma("1","H");
            } catch (SQLException ex) {
                Logger.getLogger(Menu3.class.getName()).log(Level.SEVERE, null, ex);
            }
            profserieturmamet.AdicionaProfSerie(id_prof,serie);    
        }if("V".equals(JLH2.getText())){
            try {
                serie=seriemet.BuscarSeriePorAnoeTurma("2","H");
            } catch (SQLException ex) {
                Logger.getLogger(Menu3.class.getName()).log(Level.SEVERE, null, ex);
            }
            profserieturmamet.AdicionaProfSerie(id_prof,serie);    
        }
        if("V".equals(JLH3.getText())){
            try {
                serie=seriemet.BuscarSeriePorAnoeTurma("3","H");
            } catch (SQLException ex) {
                Logger.getLogger(Menu3.class.getName()).log(Level.SEVERE, null, ex);
            }
            profserieturmamet.AdicionaProfSerie(id_prof,serie);    
        }
        
        
    }

    private void ChamaAdicionaDisc(int id_prof) {
        if(!"Clique aqui para adicionar uma disciplina".equals(disc1_prof.getText())){
            try {
                listaD=discmet.BuscarDisciplinas(disc1_prof.getText());
            } catch (SQLException ex) {
                Logger.getLogger(Menu3.class.getName()).log(Level.SEVERE, null, ex);
            }
            disciplina=listaD.get(0);
            profdiscmet.Adiciona(id_prof,disciplina);
        }
        if(!"Clique aqui para adicionar uma disciplina".equals(disc2_prof.getText())){
            try {
                listaD=discmet.BuscarDisciplinas(disc2_prof.getText());
            } catch (SQLException ex) {
                Logger.getLogger(Menu3.class.getName()).log(Level.SEVERE, null, ex);
            }
            disciplina=listaD.get(0);
            profdiscmet.Adiciona(id_prof,disciplina);
        }
        if(!"Clique aqui para adicionar uma disciplina".equals(disc3_prof.getText())){
            try {
                listaD=discmet.BuscarDisciplinas(disc3_prof.getText());
            } catch (SQLException ex) {
                Logger.getLogger(Menu3.class.getName()).log(Level.SEVERE, null, ex);
            }
            disciplina=listaD.get(0);
            profdiscmet.Adiciona(id_prof,disciplina);
        }
        if(!"Clique aqui para adicionar uma disciplina".equals(disc4_prof.getText())){
            try {
                listaD=discmet.BuscarDisciplinas(disc4_prof.getText());
            } catch (SQLException ex) {
                Logger.getLogger(Menu3.class.getName()).log(Level.SEVERE, null, ex);
            }
            disciplina=listaD.get(0);
            profdiscmet.Adiciona(id_prof,disciplina);
        }
        if(!"Clique aqui para adicionar uma disciplina".equals(disc5_prof.getText())){
            try {
                listaD=discmet.BuscarDisciplinas(disc5_prof.getText());
            } catch (SQLException ex) {
                Logger.getLogger(Menu3.class.getName()).log(Level.SEVERE, null, ex);
            }
            disciplina=listaD.get(0);
            profdiscmet.Adiciona(id_prof,disciplina);
        }
    }
    
     private void JTTabelaLinhaSelecionada2_prof (JTable tabela) {
        if (jTTabela_Disc_prof.getSelectedRow() > -1) {
            if(qwe==1){
            disc1_prof.setText(String.valueOf(listaD.get(tabela.getSelectedRow()).getNome()));
            String eixo=String.valueOf(listaD.get(tabela.getSelectedRow()).getEixo());
            if( "Regular".equals(eixo)){
              EixoR_prof.setText(eixo);  
            }
            if( "Profissional".equals(eixo)){
              EixoP_prof.setText(eixo);  
            }
            
            }
            if(qwe==2){
            disc2_prof.setText(String.valueOf(listaD.get(tabela.getSelectedRow()).getNome()));
            String eixo=String.valueOf(listaD.get(tabela.getSelectedRow()).getEixo());
            if( "Regular".equals(eixo)){
              EixoR_prof.setText(eixo);  
            }
            if( "Profissional".equals(eixo)){
              EixoP_prof.setText(eixo);  
            }
           
            }
            if(qwe==3){
            disc3_prof.setText(String.valueOf(listaD.get(tabela.getSelectedRow()).getNome()));
            String eixo=String.valueOf(listaD.get(tabela.getSelectedRow()).getEixo());
            if( "Regular".equals(eixo)){
              EixoR_prof.setText(eixo);  
            }
            if( "Profissional".equals(eixo)){
              EixoP_prof.setText(eixo);  
            }
                      }
            if(qwe==4){
            disc4_prof.setText(String.valueOf(listaD.get(tabela.getSelectedRow()).getNome()));
            String eixo=String.valueOf(listaD.get(tabela.getSelectedRow()).getEixo());
            if( "Regular".equals(eixo)){
              EixoR_prof.setText(eixo);  
            }
            if( "Profissional".equals(eixo)){
              EixoP_prof.setText(eixo);  
            }
           
            }
            if(qwe==5){
            disc5_prof.setText(String.valueOf(listaD.get(tabela.getSelectedRow()).getNome()));
            String eixo=String.valueOf(listaD.get(tabela.getSelectedRow()).getEixo());
            if( "Regular".equals(eixo)){
              EixoR_prof.setText(eixo);  
            }
            if( "Profissional".equals(eixo)){
              EixoP_prof.setText(eixo);  
            }
           
            }
            jTTabela_Disc_prof.clearSelection();
            jDialog2.setVisible(false);
            
        } else {
            
        }
        
         
  }
     
      private void AbilitaBuscarMaterias() {
        try {
            listaD= discmet.BuscarDisciplinas(JTF_Pesquisarmaterias_prof.getText() + "%");
        } catch (SQLException ex) {
            Logger.getLogger(Menu3.class.getName()).log(Level.SEVERE, null, ex);
        }
        mostraPesquisaMaterias(listaD);
       
    }

    private void mostraPesquisaMaterias(List<Disciplina> listaD) {
        while (tmDisc_prof.getRowCount() > 0) {
            tmDisc_prof.removeRow(0);
        }
        if (listaD.isEmpty()) {
            
        } else {
            String[] linhaa = new String[]{null};
            for (int ind = 0; ind < listaD.size(); ind++) {
                tmDisc_prof.addRow(linhaa);
                tmDisc_prof.setValueAt(listaD.get(ind).getNome(), ind, 0);
                 
            }
          
        }
    }

    private void AbilitaBuscarDiscCurso() {
        try {
            listaD= discmet.BuscaTodasDiscProf(JTF_Pesquisarmaterias1_prof.getText() + "%");
        } catch (SQLException ex) {
            Logger.getLogger(Menu3.class.getName()).log(Level.SEVERE, null, ex);
        }
        mostraPesquisaMaterias1(listaD);
    }
    
    
    
    private void AbilitaBuscarDiscReg() {
        try {
            listaDR= discmet.BuscaTodasDiscProfReg(JTF_Pesquisarmaterias1_prof1.getText() + "%");
        } catch (SQLException ex) {
            Logger.getLogger(Menu3.class.getName()).log(Level.SEVERE, null, ex);
        }
        mostraPesquisaMateriasReg(listaDR);
    }

    private void mostraPesquisaMaterias1(List<Disciplina> listaD) {
         while (tmDisc_prof.getRowCount() > 0) {
            tmDisc_prof.removeRow(0);
        }
        if (listaD.isEmpty()) {
            
        } else {
            String[] linhaa = new String[]{null};
            for (int ind = 0; ind < listaD.size(); ind++) {
                tmDisc_prof.addRow(linhaa);
                tmDisc_prof.setValueAt(listaD.get(ind).getNome(), ind, 0);
                 
            }
          
        }
    }
    
     private void mostraPesquisaMateriasReg(List<Disciplina> listaDR) {
         while (tmDisc_prof_reg.getRowCount() > 0) {
            tmDisc_prof_reg.removeRow(0);
        }
        if (listaDR.isEmpty()) {
            
        } else {
            String[] linhaa = new String[]{null};
            for (int ind = 0; ind < listaDR.size(); ind++) {
                tmDisc_prof_reg.addRow(linhaa);
                tmDisc_prof_reg.setValueAt(listaDR.get(ind).getNome(), ind, 0);
                 
            }
          
        }
    }
    
     private void JTTabelaLinhaSelecionada3_prof (JTable tabela) {
         asdd=0;
         
         if (jTTabela_Disc1_prof.getSelectedRow() > -1) {
            if("".equals(disc1_prof.getText())  && asdd==0){
            disc1_prof.setText(String.valueOf(listaD.get(tabela.getSelectedRow()).getNome()));
            asdd=1;
            
            
            }
            if("".equals(disc2_prof.getText())  && !"".equals(disc1_prof.getText())  && asdd==0){
            disc2_prof.setText(String.valueOf(listaD.get(tabela.getSelectedRow()).getNome()));
            asdd=1;
            
           
            }
            if("".equals(disc3_prof.getText())  && !"".equals(disc1_prof.getText())  && !"".equals(disc2_prof.getText())  && asdd==0){
            disc3_prof.setText(String.valueOf(listaD.get(tabela.getSelectedRow()).getNome()));
            asdd=1;
            
                      }
            if("".equals(disc4_prof.getText()) && !"".equals(disc1_prof.getText()) && !"".equals(disc2_prof.getText())  && !"".equals(disc3_prof.getText())  && asdd==0){
            disc4_prof.setText(String.valueOf(listaD.get(tabela.getSelectedRow()).getNome()));
           asdd=1;
            
           
            }
            if("".equals(disc5_prof.getText())  && !"".equals(disc1_prof.getText()) && !"".equals(disc2_prof.getText()) && !"".equals(disc3_prof.getText())  && !"".equals(disc4_prof.getText())   && asdd==0){
            disc5_prof.setText(String.valueOf(listaD.get(tabela.getSelectedRow()).getNome()));
            asdd=1;
            
           
            }
            jTTabela_Disc1_prof.clearSelection();
            
        } else {
            
        }
        
         
  } 
     
     private void JTTabelaLinhaSelecionada_prof_reg (JTable tabela) {
         asdd=0;
         
         if (jTTabela_Disc_prof_reg.getSelectedRow() > -1) {
            if("".equals(disc1_prof.getText())  && asdd==0){
            disc1_prof.setText(String.valueOf(listaDR.get(tabela.getSelectedRow()).getNome()));
            asdd=1;
            
            
            }
            if("".equals(disc2_prof.getText())  && !"".equals(disc1_prof.getText())  && asdd==0){
            disc2_prof.setText(String.valueOf(listaDR.get(tabela.getSelectedRow()).getNome()));
            asdd=1;
            
           
            }
            if("".equals(disc3_prof.getText())  && !"".equals(disc1_prof.getText())  && !"".equals(disc2_prof.getText())  && asdd==0){
            disc3_prof.setText(String.valueOf(listaDR.get(tabela.getSelectedRow()).getNome()));
            asdd=1;
            
                      }
            if("".equals(disc4_prof.getText()) && !"".equals(disc1_prof.getText()) && !"".equals(disc2_prof.getText())  && !"".equals(disc3_prof.getText())  && asdd==0){
            disc4_prof.setText(String.valueOf(listaDR.get(tabela.getSelectedRow()).getNome()));
           asdd=1;
            
           
            }
            if("".equals(disc5_prof.getText())  && !"".equals(disc1_prof.getText()) && !"".equals(disc2_prof.getText()) && !"".equals(disc3_prof.getText())  && !"".equals(disc4_prof.getText())   && asdd==0){
            disc5_prof.setText(String.valueOf(listaDR.get(tabela.getSelectedRow()).getNome()));
            asdd=1;
            
           
            }
            jTTabela_Disc_prof_reg.clearSelection();
            
        } else {
            
        }
        
         
  } 
}
